code: public static double positive(@Nullable String role, double x) {
  		if (!(x > 0)) { // not x < 0, to work with NaN.
  			throw new IllegalArgumentException(role + " (" + x + ") must be >= 0");
  		}
  		return x;
  	}
docs: 校验为正数则返回该数字，否则抛出异常.