Skip to content

Commit

Permalink
refactor(TripMonitorNotification): Add comment for comparator/sort fu…
Browse files Browse the repository at this point in the history
…nction.
  • Loading branch information
binh-dam-ibigroup committed Nov 29, 2023
1 parent 7264908 commit 20b65d1
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ public TripMonitorNotification(NotificationType type, String body) {
this.body = body;
}

/**
* Basic comparator that sets an arbitrary lower rank for initial reminders,
* so that they appear before other notifications after list sorting.
*/
public int sortOrder() {
return type == NotificationType.INITIAL_REMINDER ? -100 : 0;
}
Expand Down

0 comments on commit 20b65d1

Please sign in to comment.