Class Comparators
java.lang.Object
io.vavr.collection.Comparators
INTERNAL: Common
Comparator related functions (not intended to be public).-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static <U> Comparator<U> Returns the natural comparator for type U, i.e.
-
Constructor Details
-
Comparators
private Comparators()
-
-
Method Details
-
naturalComparator
Returns the natural comparator for type U, i.e. treating it asComparable<U>. The returned comparator is alsojava.io.Serializable.Please note that this will lead to runtime exceptions, if U is not Comparable.
- Type Parameters:
U- The type- Returns:
- The natural Comparator of type U
-