P
Philipp
Tom said:My money is on some kind of bug in compareTo too. I don't see what else
it can be.
Could it be that the comparator must be consistent with equals for the
sort to work?
Phil
Tom said:My money is on some kind of bug in compareTo too. I don't see what else
it can be.
Lew said:That would be Owen's point.
Lew said:captain said :
captain, why are you using a label? That is highly unidiomatic.
captain said:This is my very first post and I am not up on the etiquete yet.
I realize that the problem must be in my code. Actually, I didn't
right this code, I inherited it. I have a lot of programming
experience but not in this particular environment.
[...]
It is astonishing, or perhaps sobering or depressing, to
find that someone with "a lot of programming experience" is
unable to form a coherent problem report nor able to produce
a usable test case.
That would be Owen's point.
captain, why are you using a label? That is highly unidiomatic.
I'm guessing that the 'programming' is the type they have on TV.
It is much more likely that the OP's compareTo is inconsistent with
itself, so that it does not represent a total order.
it could be simply some quite different language, like LISP.
Lew said:And yet the Javadocs for Comparator make a big deal out it. Why should
they do that if it doesn't matter?
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.