A Java `JComparator`

that wraps a function
returning `Comparison`

. The given `compareElements()`

function will
be used to compare null values if `Element`

covers `Null`

. Otherwise,
nulls will be ordered according to the `nulls`

parameter.

*no subtypes hierarchy*

Initializer |

`JavaComparator(Comparison compareElements(Element x, Element y), smaller|larger nulls = ...)` |

Methods | |

`compare` | Source Code`shared actual Integer compare(Element? first, Element? second)` Refines `Comparator.compare` |

`equals` | Source Code`shared actual Boolean equals(Object that)` Determine if two values are equal. For any two non-null objects x == y Implementations should respect the constraints that: - if
`x===y` then`x==y` (reflexivity), - if
`x==y` then`y==x` (symmetry), - if
`x==y` and`y==z` then`x==z` (transitivity).
Furthermore it is recommended that implementations
ensure that if A class which explicitly refines Note that an implementation of |

Inherited Methods |

Methods inherited from: `Object` |

Methods inherited from: `JComparator<T>` `compare` , `equals` |