public static <T> Collection<T> notEmpty(Collection<T> collection, String name) {
    """
	Check that given collection is not empty (i.e null or with a size equal to zero).
	It throws a {@link IllegalArgumentException} exception if collection is empty or
	returned original collection otherwise.
	
	Generated message will be : {name} must not be empty
	Where name is the value given in parameter.
	
	@param collection Collection.
	@param name Name of field to produce exception message.
	@param <T> Type of elements.
	@return Original collection.
	@throws NullPointerException If {@code collection} is {@code null}.
	@throws IllegalArgumentException If {@code collection} is empty.
    """
		notNull(collection, name);

		if (collection.isEmpty()) {
			throw new IllegalArgumentException(format("%s must not be empty", name));
		}

		return collection;
	}
public static <T> Collection<T> notEmpty(Collection<T> collection, String name) {
		notNull(collection, name);

		if (collection.isEmpty()) {
			throw new IllegalArgumentException(format("%s must not be empty", name));
		}

		return collection;
	}
public static < T > Collection < T > notEmpty ( Collection < T > collection , String name ) { notNull ( collection , name ) ; if ( collection . isEmpty ( ) ) { throw new IllegalArgumentException ( format ( "%s must not be empty" , name ) ) ; } return collection ; }
Check that given collection is not empty (i.e null or with a size equal to zero).
It throws a {@link IllegalArgumentException} exception if collection is empty or
returned original collection otherwise.

Generated message will be : {name} must not be empty
Where name is the value given in parameter.

@param collection Collection.
@param name Name of field to produce exception message.
@param <T> Type of elements.
@return Original collection.
@throws NullPointerException If {@code collection} is {@code null}.
@throws IllegalArgumentException If {@code collection} is empty.
Check that given collection is not empty ( i . e null or with a size equal to zero ) . It throws a { @link IllegalArgumentException } exception if collection is empty or returned original collection otherwise .