- (comparator-if<=> [ <comparator> ] <object1> <object2> <less-than> <equal-to> <greater-than>)syntax
It is an error unless <comparator> evaluates to a comparator and <object1> and <object2> evaluate to objects that the comparator can handle. If the ordering predicate returns true when applied to the values of <object1> and <object2> in that order, then <less-than> is evaluated and its value returned. If the equality predicate returns true when applied in the same way, then <equal-to> is evaluated and its value returned. If neither returns true, <greater-than> is evaluated and its value returned.
If <comparator> is omitted, a default comparator is used.