public static < T > T firstValue ( Map < String , T > map ) { if ( map == null || map . size ( ) == 0 ) { return null ; } String firstKey = map . keySet ( ) . iterator ( ) . next ( ) ; return map . get ( firstKey ) ; }
Returns first value in map as given by the iterator or null if empty