Class Sortables


  • public class Sortables
    extends Object
    Class containing methods to make Sortable interface and Sort annotation useful.
    Author:
    erlend
    • Constructor Detail

      • Sortables

        public Sortables()
    • 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.