I have this list:
List<Alarm> localNotifications;
in it I have a bunch of Alarm
objects that have a few properties, one of which is a timestamp in milliseconds.
How do I remove Alarm
objects with identical times from the list so that only unique timestamps remain in it?
PS: If two alarms have the same timestamp
but different properties, either one will do, so I don't care which one will remain in the list.
private class Alarm {
long timestamp;
String title;
String body;
}