Search:

Type: Posts; User: Cornix

Search: Search took 0.19 seconds.

  1. Re: TreeSet contains(obj) doe not behave as expected

    Well, thanks for your time.
  2. Re: TreeSet contains(obj) doe not behave as expected

    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...
  3. Re: TreeSet contains(obj) doe not behave as expected

    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.
  4. Re: TreeSet contains(obj) doe not behave as expected

    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...
  5. Re: TreeSet contains(obj) doe not behave as expected

    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...
  6. TreeSet contains(obj) doe not behave as expected

    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...
Results 1 to 6 of 6