public static < T > T firstEntry ( final List < T > list ) { if ( list != null && ! list . isEmpty ( ) ) { return list . get ( 0 ) ; } else { return null ; } }
Extracts the first entry of the list when it is not null and contains values .