public static void notEmpty ( final Collection < ? > collection , final String parameterName ) { if ( collection . isEmpty ( ) ) { throw new IllegalArgumentException ( "\"" + parameterName + "\" must not be null or empty, but was: " + collection ) ; } }
Check that the provided Collection is not empty ) .