Skip to content

Commit

Permalink
<update>: rewrite method getName() comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
wickdynex committed Nov 5, 2024
1 parent 7ba3872 commit cf91405
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public void addPet(Pet pet) {
/**
* Return the Pet with the given name, or null if none found for this Owner.
* @param name to test
* @return a pet if pet name is already in use
* @return the Pet with the given name, or null if no such Pet exists for this Owner
*/
public Pet getPet(String name) {
return getPet(name, false);
Expand All @@ -110,7 +110,7 @@ public Pet getPet(String name) {
/**
* Return the Pet with the given id, or null if none found for this Owner.
* @param id to test
* @return a pet if pet id is already in use
* @return the Pet with the given id, or null if no such Pet exists for this Owner
*/
public Pet getPet(Integer id) {
for (Pet pet : getPets()) {
Expand All @@ -127,7 +127,8 @@ public Pet getPet(Integer id) {
/**
* Return the Pet with the given name, or null if none found for this Owner.
* @param name to test
* @return a pet if pet name is already in use
* @param ignoreNew whether to ignore new pets (pets that are not saved yet)
* @return the Pet with the given name, or null if no such Pet exists for this Owner
*/
public Pet getPet(String name, boolean ignoreNew) {
for (Pet pet : getPets()) {
Expand Down

0 comments on commit cf91405

Please sign in to comment.