TreeSet removes different items with the same Comprator value. I don't want it be removed. Is there any way to control this? Or use another container class?
Added: OK. It seems I can't use Set. I need insert sorting feature, for performance consideration. Can List do this? Thanks all.
A set by definition can not have duplicate entries.
So you need to use a List or Array or such