Skip to content

Commit

Permalink
update "find.java" to adhere to checkstyle guidelines
Browse files Browse the repository at this point in the history
  • Loading branch information
kaboomzxc committed Oct 2, 2024
1 parent 984a406 commit a14f71e
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/main/java/BookBob/functions/Find.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@
import java.util.List;

public class Find {
public static List<Patient> findPatients(CommandAttributeType commandAttributeType, Records records, String[] keywords) {
public static List<Patient> findPatients(CommandAttributeType commandAttributeType,
Records records, String[] keywords) {
return switch (commandAttributeType) {
case NAME -> findPatientsByName(records, keywords);
case NRIC -> findPatientsByNric(records, keywords);
case DATE_OF_BIRTH -> findPatientsByDateOfBirth(records, keywords);
case PHONE_NUMBER -> findPatientsByPhoneNumber(records, keywords);
case HOME_ADDRESS -> findPatientsByHomeAddress(records, keywords);
case DIAGNOSIS -> findPatientsByDiagnosis(records, keywords);
case MEDICATION -> findPatientsByMedication(records, keywords);
case NAME -> findPatientsByName(records, keywords);
case NRIC -> findPatientsByNric(records, keywords);
case DATE_OF_BIRTH -> findPatientsByDateOfBirth(records, keywords);
case PHONE_NUMBER -> findPatientsByPhoneNumber(records, keywords);
case HOME_ADDRESS -> findPatientsByHomeAddress(records, keywords);
case DIAGNOSIS -> findPatientsByDiagnosis(records, keywords);
case MEDICATION -> findPatientsByMedication(records, keywords);
};
}

Expand Down

0 comments on commit a14f71e

Please sign in to comment.