Skip to content

Commit

Permalink
Update EditPersonDescriptorBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
iamtr committed Mar 31, 2024
1 parent 13687b4 commit 621c852
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import java.util.stream.Stream;

import seedu.address.logic.commands.EditCommand.EditPersonDescriptor;
import seedu.address.model.person.AdmissionDate;
import seedu.address.model.person.Dob;
import seedu.address.model.person.Ic;
import seedu.address.model.person.Name;
import seedu.address.model.person.Person;
Expand Down Expand Up @@ -72,6 +74,20 @@ public EditPersonDescriptorBuilder withTags(String... tags) {
descriptor.setTags(tagSet);
return this;
}
/**
* Sets the {@code Dob} of the {@code EditPersonDescriptor} that we are building.
*/
public EditPersonDescriptorBuilder withDob(String dob) {
descriptor.setDob(new Dob(dob));
return this;
}
/**
* Sets the {@code AdmissionDate} of the {@code EditPersonDescriptor} that we are building.
*/
public EditPersonDescriptorBuilder withAdmissionDate(String admissionDate) {
descriptor.setAdmissionDate(new AdmissionDate(admissionDate));
return this;
}

public EditPersonDescriptor build() {
return descriptor;
Expand Down

0 comments on commit 621c852

Please sign in to comment.