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);
		}
	}
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).

@param collection collection to check
@param parameterName name of the parameter to display in the error message