I am retrieving a List from a JPA query, ordered by effectiveDate. There could be duplicate entries except for the date column, and I'll be ordering them most recent date first (desc). All I want in the set are all the entries with the newest effectiveDate; dupes with older effectiveDates are not allowed in the Set.
If I create a HashSet by passing this List into the constructor, does the new Set only contain the first entries in the List, only the ones with the "newest" effectiveDates?
In other words, are Sets initialized in List order when they are created from a List?
Thanks!