Package org.okkam.awesome.utils
Class OkkamComparators
- java.lang.Object
-
- org.okkam.awesome.utils.OkkamComparators
-
public class OkkamComparators extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T extends Comparable<T>>
Comparator<T>sortAscending()Comparator to sort ascending (or alphabetically for strings).static <T extends Comparable<T>>
Comparator<T>sortDescending()Comparator to sort descending (or reverse alphabetically for strings).
-
-
-
Method Detail
-
sortAscending
public static <T extends Comparable<T>> Comparator<T> sortAscending()
Comparator to sort ascending (or alphabetically for strings).- Type Parameters:
T- the type of the generic- Returns:
- The comparator
-
sortDescending
public static <T extends Comparable<T>> Comparator<T> sortDescending()
Comparator to sort descending (or reverse alphabetically for strings).- Type Parameters:
T- the type of the generic- Returns:
- The comparator
-
-