Skip to content

Commit

Permalink
Remove Rid from Reminders
Browse files Browse the repository at this point in the history
  • Loading branch information
jovyntls committed Oct 17, 2021
1 parent 02469c1 commit 8d29ea8
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 22 deletions.
1 change: 0 additions & 1 deletion src/main/java/seedu/address/model/AddressBook.java
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ public boolean hasReminder(Reminder reminder) {
*/
public void addReminder(Reminder reminder) {
reminders.add(reminder);
reminder.setRid(reminders.getCurrentIndex() + 1);
}

/**
Expand Down
9 changes: 0 additions & 9 deletions src/main/java/seedu/address/model/reminder/Reminder.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ public class Reminder {
// Identity fields
private final ReminderName reminderName;
private final ReminderStartDate reminderStartDate;
private int rid;

/**
* Every field must be present and not null.
Expand All @@ -27,14 +26,6 @@ public ReminderStartDate getStartDate() {
return reminderStartDate;
}

public void setRid(int rid) {
this.rid = rid;
}

public int getRid() {
return rid;
}

/**
* Returns true if both Reminders have the same reminderName.
* This defines a weaker notion of equality between two Reminders.
Expand Down
12 changes: 0 additions & 12 deletions src/main/java/seedu/address/model/reminder/UniqueReminderList.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,6 @@ public class UniqueReminderList implements Iterable<Reminder> {
private final ObservableList<Reminder> internalUnmodifiableList =
FXCollections.unmodifiableObservableList(internalList);

/**
* Returns the current largest rid
* @return the current largest rid
*/
public int getCurrentIndex() {
if (this.internalList.size() == 0) {
return 0;
} else {
return this.internalList.get(this.internalList.size() - 1).getRid();
}
}

/**
* Returns true if the list contains an equivalent Reminder as the given argument.
*/
Expand Down

0 comments on commit 8d29ea8

Please sign in to comment.