public static void notEmpty ( final Collection < ? > collection , final String collectionName ) { notNull ( collection , collectionName ) ; if ( collection . isEmpty ( ) ) { throw new IllegalArgumentException ( "expecting " + maskNullArgument ( collectionName ) + " to contain 1 or more elements" ) ; } }
Check that a collection is not empty