I've been trying a few things with sets and comparators etc.
I also have an appropriate compareTo() method. I can't figure out why the first print statement prints false. However, if I were not to add, say a to the set, then the first line & the second line prints true.
Your implementation for compareTo is not complete. You checked only if two objects of type AggTuples are equals or not, but the implementation of compare To should be able to provide addtional info as which object should be inserted before another, because lements inside a treeSet should be sorted.