public static < T > T lastOf ( List < T > list , Sort ... sorts ) { if ( list . size ( ) > 1 ) { Sorting . sort ( list , sorts ) ; return list . get ( list . size ( ) - 1 ) ; } else { return null ; } }
Grabs the last items after the sort .