@ Beta public static < K , V > Map . Entry < K , V > getOnlyEntry ( Map < K , V > map ) { checkArgument ( map != null , "Expected non-null map" ) ; return getOnlyElement ( map . entrySet ( ) ) ; }
Gets the only element from a given map or throws an exception