diff --git a/src/main/java/seedu/staffsnap/commons/util/StringUtil.java b/src/main/java/seedu/staffsnap/commons/util/StringUtil.java index 5409d3c125e..3fe3b5730ce 100644 --- a/src/main/java/seedu/staffsnap/commons/util/StringUtil.java +++ b/src/main/java/seedu/staffsnap/commons/util/StringUtil.java @@ -39,14 +39,15 @@ public static boolean containsWordIgnoreCase(String sentence, String word) { /** * Returns true if the {@code sentence} contains the {@code word}. - * Ignores case, but a full word match is required. + * Ignores case. *
examples:
-     *       containsWordIgnoreCase("ABc def", "abc") == true
-     *       containsWordIgnoreCase("ABc def", "DEF") == true
-     *       containsWordIgnoreCase("ABc def", "AB") == false //not a full word match
+     *       containsStringIgnoreCase("ABc def", "abc") == true
+     *       containsStringIgnoreCase("ABc def", "DEF") == true
+     *       containsStringIgnoreCase("ABc def", "AB") == true
+     *       containsStringIgnoreCase("ABc def", "acd") == false // "acd" is not a substring in "ABc def"
      *       
- * @param sentence cannot be null - * @param word cannot be null, cannot be empty, must be a single word + * @param sentence a String that is not null + * @param word a String that is not empty and is not null */ public static boolean containsStringIgnoreCase(String sentence, String word) { requireNonNull(sentence); diff --git a/src/main/java/seedu/staffsnap/logic/commands/FilterCommand.java b/src/main/java/seedu/staffsnap/logic/commands/FilterCommand.java index 46a7d349707..abdd2877232 100644 --- a/src/main/java/seedu/staffsnap/logic/commands/FilterCommand.java +++ b/src/main/java/seedu/staffsnap/logic/commands/FilterCommand.java @@ -52,8 +52,8 @@ public CommandResult execute(Model model) { } /** - * Checks if the applicant exists. - * @param other Other applicant. + * Checks if the two FilterCommand objects are equivalent, by comparing the equivalence of their predicates. + * @param other Other FilterCommand. * @return true if equals, false if not equals. */ @Override @@ -68,7 +68,6 @@ public boolean equals(Object other) { } FilterCommand otherFilterCommand = (FilterCommand) other; - System.out.println("predicate = " + predicate); return predicate.equals(otherFilterCommand.predicate); } diff --git a/src/main/java/seedu/staffsnap/logic/parser/FilterCommandParser.java b/src/main/java/seedu/staffsnap/logic/parser/FilterCommandParser.java index 16cf755c90c..f73f075e627 100644 --- a/src/main/java/seedu/staffsnap/logic/parser/FilterCommandParser.java +++ b/src/main/java/seedu/staffsnap/logic/parser/FilterCommandParser.java @@ -26,7 +26,6 @@ /** * Parses input arguments and creates a new FilterCommand object */ - public class FilterCommandParser implements Parser { /** diff --git a/src/main/java/seedu/staffsnap/logic/parser/ParserUtil.java b/src/main/java/seedu/staffsnap/logic/parser/ParserUtil.java index d8581013157..11842dbedd4 100644 --- a/src/main/java/seedu/staffsnap/logic/parser/ParserUtil.java +++ b/src/main/java/seedu/staffsnap/logic/parser/ParserUtil.java @@ -218,8 +218,9 @@ public static boolean arePrefixesPresent(ArgumentMultimap argumentMultimap, Pref /** * Parses a {@code String status} into a {@code Status}. + * * @param status String representation of Status - * @return Status if successful, or null of no matching status is found. + * @return Status if successful, or null if no matching status is found. */ public static Status parseStatus(String status) { requireNonNull(status); @@ -228,6 +229,7 @@ public static Status parseStatus(String status) { /** * Parses a {@code String score} into a {@code Double}. + * * @param score String representation of score * @return Double score which is the average rating of all interviews * @throws ParseException if a NumberFormatException is caught diff --git a/src/main/java/seedu/staffsnap/model/applicant/Applicant.java b/src/main/java/seedu/staffsnap/model/applicant/Applicant.java index 212ebc7af82..583dd461897 100644 --- a/src/main/java/seedu/staffsnap/model/applicant/Applicant.java +++ b/src/main/java/seedu/staffsnap/model/applicant/Applicant.java @@ -223,8 +223,7 @@ public void setStatus(Status status) { public Double getScore() { List interviews = getInterviews(); Double totalScore = 0.; - for (Interview interview: interviews - ) { + for (Interview interview: interviews) { totalScore += new Double(interview.rating.value); } Double averageScore = totalScore / interviews.size(); diff --git a/src/main/java/seedu/staffsnap/model/applicant/CustomFilterPredicate.java b/src/main/java/seedu/staffsnap/model/applicant/CustomFilterPredicate.java index 34df9a85bd5..fbfa6ae530f 100644 --- a/src/main/java/seedu/staffsnap/model/applicant/CustomFilterPredicate.java +++ b/src/main/java/seedu/staffsnap/model/applicant/CustomFilterPredicate.java @@ -47,7 +47,7 @@ public CustomFilterPredicate(Name name, Phone phone, Email email, Position posit } /** - * @param applicant the input argument + * @param applicant the applicant to be tested. * @return true if applicant matches all specified fields in the predicate */ @Override