Skip to content

Commit

Permalink
Merge pull request #328 from LamJiuFong/master
Browse files Browse the repository at this point in the history
  • Loading branch information
TehOPanas authored Nov 13, 2023
2 parents 32c2f18 + 92e3f16 commit 4ace6e9
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 17 deletions.
17 changes: 10 additions & 7 deletions src/main/java/seedu/address/logic/commands/EditCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -154,17 +154,20 @@ public static class EditPersonDescriptor {
private Email email;
private Address address;

/**
* Constructs an empty EditPersonDescriptor instance.
*/
public EditPersonDescriptor() {}

/**
* Copy constructor.
* Constructs an EditPersonDescriptor instance with the given {@code descriptionToCopy}.
*/
public EditPersonDescriptor(EditPersonDescriptor toCopy) {
requireNonNull(toCopy);
setName(toCopy.name);
setPhone(toCopy.phone);
setEmail(toCopy.email);
setAddress(toCopy.address);
public EditPersonDescriptor(EditPersonDescriptor descriptionToCopy) {
requireNonNull(descriptionToCopy);
setName(descriptionToCopy.name);
setPhone(descriptionToCopy.phone);
setEmail(descriptionToCopy.email);
setAddress(descriptionToCopy.address);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import seedu.address.model.Model;

/**
* Format full help instructions for every command for display.
* Formats full help instructions for every command for display.
*/
public class HelpCommand extends Command {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ private EditPersonDescriptor getEditPersonDescriptor(ArgumentMultimap argMultima
}

/**
* Check if {@code prefixes} are present in the {@code argMultimap}.
* Checks if {@code prefixes} are present in the {@code argMultimap}.
*
* @param argMultimap that we are performing search on.
* @param prefixes to search for.
Expand Down
4 changes: 1 addition & 3 deletions src/main/java/seedu/address/model/person/Person.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ public class Person {
/**
* Every field must be present and not null.
*/

public Person(Name name, Phone phone, Email email,
Address address, Remark remark, Set<Tag> tags,
Set<Insurance> insurances, Appointment appointment, AppointmentCount count) {
Expand All @@ -59,7 +58,6 @@ public Person(Name name, Phone phone, Email email,
/**
* Every field must be present and not null.
*/

public Person(Name name, Phone phone, Email email, Address address, Remark remark,
Set<Tag> tags, Set<Insurance> insurances,
Appointment appointment, AppointmentCount count, Priority priority) {
Expand Down Expand Up @@ -195,7 +193,7 @@ public static Person createPersonWithUpdatedInsurances(Person source, Collection
}

/**
* Creates and returns a {@code Person} with details of {@code source}, assigning priority of
* Creates and returns a {@code Person} with details of {@code personToUpdate}, assigning priority of
* {@code newPriority}.
*/
public static Person createPersonWithUpdatedPriority(Person personToUpdate, Priority newPriority) {
Expand Down
7 changes: 2 additions & 5 deletions src/main/java/seedu/address/model/priority/Priority.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public class Priority {
+ HIGH_PRIORITY_KEYWORD + ", " + MEDIUM_PRIORITY_KEYWORD + ", " + LOW_PRIORITY_KEYWORD + ", "
+ NONE_PRIORITY_KEYWORD + " }";

private Level level;
private final Level level;

/**
* Constructs a {@code Priority}.
Expand Down Expand Up @@ -79,17 +79,14 @@ public static Level parsePriorityLevel(String priority) {
}

/**
* Checks if the priority given is valid.
* Returns true if the {@code priority} given is valid.
*
* @param priority to check.
*/
public static boolean isValidPriority(String priority) {
return VALID_PRIORITY_KEYWORDS.contains(priority);
}

/**
* Returns priority level.
*/
public Level getPriorityLevel() {
return this.level;
}
Expand Down

0 comments on commit 4ace6e9

Please sign in to comment.