On Mon, 19 May 2025 07:25:17 GMT, Tagir F. Valeev <[email protected]> wrote:
> I'm not sure whether we should specify exactly the behavior in case if the
> comparator returns 0. I feel that it could be a useful invariant that
> `Comparator.min(a, b)` and `Comparator.max(a, b)` always return different
> argument, partitioning the set of {a, b} objects (even if they are equal).
> But I'm open to suggestions here.
IMHO it makes sense. It's the min/max analog to a stable sort.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/25297#issuecomment-2891353170