In Java, operators <, >, >= and <= are not defined for the primitive boolean type.
However, the corresponding wrapper class Boolean implements Comparable.
That is: true > false
is an error, but Boolean.TRUE.compareTo(Boolean.FALSE) > 0 is fine.
How come? Did the language designers change their mind? Why keep the incoherent behavior, then?
Although arbitrary, I can think of advantages to having a total order defined for booleans. Are there any disadvantages?