code: public static void assertArraySize(int size, double[] array, Supplier<String> errmsg){
  		if(array.length != size){
  			throw new IllegalArgumentException(errmsg.get());
  		}
  	}
docs: Throws an {@link IllegalArgumentException} is the specified array is not of specified size
  @param size for array to have
  @param array to check
  @param errmsg generates message to put into exception