@ Nullable public static < T > T lastElement ( @ Nullable final List < T > list ) { if ( CollectionUtils . isEmpty ( list ) ) { return null ; } return list . get ( list . size ( ) - 1 ) ; }
Retrieve the last element of the given List accessing the highest index .