"This is so because sorted sets (and sorted maps) without explicit comparators behave``strangely""when they are used with elements (or keys) whose natural ordering is inconsistent with equals."
Such a sorted set (or sorted map) violates the general contract for set (or map), which is defined in terms of the equals method.