Originally Posted by
douglas.nelson@oracle.com
In this example the compare just returns a 1, all elements are kept in the set no real sorting is taking place because it is not the problem I am seeing The issues is loading data in to a treeset with identical pointers from a list into a treeset. If you look at the output there should be no duplicates in the final treeset. If you increase up the loop count the treeset will only be populated by the last set and all the previous elemens are duplicated, if you go to the original source an up the loopcount to 4 and run the test.Then move the getdata method into the for loop above the set iterator and you will see all the element are there in order they ware entered(expected results). See my second post for an example. If someone has a better way of doing this please share the results page and let me know what you did.