public static <T>Collection<T> notEmpty(Collection<T> list,String name){
  notNull(list,name);
  if (list.isEmpty()) {
    throw new IllegalArgumentException(String.format("Collection %s is empty",name));
  }
  return list;
}

public static < T > Collection < T > notEmpty ( Collection < T > list , String name ) { notNull ( list , name ) ; if ( list . isEmpty ( ) ) { throw new IllegalArgumentException ( String . format ( "Collection %s is empty" , name ) ) ; } return list ; }
check that a list is not null and not empty .
