Java doc TreeSet contains enigmatic assertion: “The behavior of a TreeSet is well-defined even if its ordering is strictly partial; it just fails to obey the general contract of the Set interface. ” I wonder how is it possible to supply partially ordered elements when Comparable.compareTo() is defined for any pair of elements and therefore implies total relation (if total relation is reflexive, antisymmetric, and transitive, then it’s total order).
Java doc TreeSet contains enigmatic assertion: The behavior of a TreeSet is well-defined even
Share
I don’t find any information about ‘partial’ in JavaDoc 5.
A Red-Black tree works for the TreeSet implementation which has nothing with ‘partial’.
Are you sure you are reading java.util.TreeSet?