public static void notEmpty ( Collection collection , String name ) { notNull ( collection , name ) ; if ( collection . isEmpty ( ) ) { throw new IllegalArgumentException ( name + " must not be empty" ) ; } }
Checks that a given collection is not null and not empty .