public static void size ( Map < ? , ? > parameter , int size , String name ) throws IllegalArgumentException { if ( parameter . size ( ) != size ) { throw new IllegalArgumentException ( String . format ( "%s size is not %d." , name , size ) ) ; } }
Test if given map size has a specified value .