I have the following Java POJO
public class Game {
public Game(){}
private String id;
private String startDate = "";
}
How can I implement functionality that will determine duplicate fields within a list of Game objects?
For example when both Games have the same start date?
I have used comparator before but only when sorting objects, e.g. based on earliest date etc, but can it be used to sort duplicates?