Well, thanks for your time.
Type: Posts; User: Cornix
Well, thanks for your time.
But it says the comparator should only return 0 if both elements are equal. In my case the equal Z correlates to a "dont care" in what way they are ordered. After all, my comparator correctly returns...
But wouldnt a tree be faster?
By the way, where am I adding the same element twice to the TreeSet in my example? Every element should only be inserted once by my intention.
Well, the comparator returns 0 if 2 elements are equal. As far as I understood thats how its supposed to be, isnt it?
What exactly would be a good choice for a quick sorted data structure? I...
It happens when I change the Z-coordinate of a layer. I remove it, change the Z, and add it again.
Its not arbitrary, it always happens with a given set of layers and always happens to the same...
Hello,
I am using the class TreeSet from the java collections library and I have a little problem with the "contains(Object)" method.
I want to use the TreeSet to order a number of Layer-Objects...