Package network.oxalis.ng.commons.util
Class Sortables
- java.lang.Object
-
- network.oxalis.ng.commons.util.Sortables
-
public class Sortables extends Object
Class containing methods to make Sortable interface and Sort annotation useful.- Author:
- erlend
-
-
Constructor Summary
Constructors Constructor Description Sortables()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> Comparator<T>comparator()Returns a comparator.static <T> intextract(T o)Method extracting order value from a given object.
-
-
-
Method Detail
-
extract
public static <T> int extract(T o)
Method extracting order value from a given object.- Type Parameters:
T- The type of the elements to be sorted.- Parameters:
o- Object to extract value for comparison.- Returns:
- Value used to compare.
-
comparator
public static <T> Comparator<T> comparator()
Returns a comparator.- Type Parameters:
T- The type of the elements to be sorted.- Returns:
- Comparator to be used for sorting.
-
-