public static void notEmpty ( Object [ ] arr , String name ) { notNull ( arr , name ) ; if ( arr . length == 0 ) { throw new IllegalArgumentException ( name + "must not be empty" ) ; } }
Checks that a given array is not null and not empty .