In your case, it's also quite dangerous, because you're changing something that is used to determine uniqueness, and that's usually very bad news
Jeff Verdegan wrote:You want the entries to be unique? That screams Set. You want them sorted too? That screams TreeSet. I don't see why you're even considering a List.
But I realized a few issues with Sets if I wanted to do a comparison