Why does it need to be wrapped in a TreeSet? It could very well be that I'm missing something.