UniqueList purpose?
hrstoyanov opened this issue · 2 comments
hrstoyanov commented
Ivan,
What is the purpose of the UniqueList class? If you needed a Set that also preserves the order of insertion, you could use LinkedHashSet, otherwise just use HashSet?
hrstoyanov commented
...ok, i think i know why you need it ...
ivan-vasilev commented
I'll try to explain anyway. As you mentioned LinkedHashSet would do the same job. However, I think that approach has two drawbacks:
- you cannot do listObject.get(N),
- during step-by-step debugging it's much easier to see the contents of a list, rather than a set (at least in eclipse it is).