How can I implement a comparator in this treeset so I can compare my nodes with my custom function when adding an element. So I would like to be able to do something like th