From 2933d59feac971ab00b6f7f6b22a90d3b5412cae Mon Sep 17 00:00:00 2001 From: Anant Shanker Date: Wed, 10 Apr 2024 17:18:37 +0800 Subject: [PATCH] Include brackets in toString --- .../seedu/address/model/weeknumber/WeekNumber.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/main/java/seedu/address/model/weeknumber/WeekNumber.java b/src/main/java/seedu/address/model/weeknumber/WeekNumber.java index 4ba94073372..21eb389e133 100644 --- a/src/main/java/seedu/address/model/weeknumber/WeekNumber.java +++ b/src/main/java/seedu/address/model/weeknumber/WeekNumber.java @@ -31,12 +31,6 @@ public WeekNumber(String weekNumber) { public static boolean isValidWeekNumber(String test) { return test.matches(VALIDATION_REGEX); } - - @Override - public String toString() { - return value.toString(); - } - @Override public boolean equals(Object other) { if (other == this) { @@ -55,4 +49,8 @@ public boolean equals(Object other) { public int hashCode() { return value.hashCode(); } + @Override + public String toString() { + return "[" + value.toString() + "]"; + } }