code: public static void size(Collection<?> parameter, int size, String name) throws IllegalArgumentException {
  		if (parameter.size() != size) {
  			throw new IllegalArgumentException(String.format("%s size is not %d.", name, size));
  		}
  	}
docs: Test if given collection size has a specified value.
  
  @param parameter invocation collection parameters,
  @param size requested size,
  @param name the name of invocation parameter.
  @throws IllegalArgumentException if collection has not requested size.