@ Override public < E > List < E > sort ( final List < E > elements ) { Collections . sort ( elements , getOrderBy ( ) ) ; return elements ; }
Uses Java s modified Merge Sort algorithm to sort a List of elements as defined by the Comparator or as determined by the elements in the collection if the elements are Comparable .