Enforces that the number is larger than 0.
@param number the number to test
@param name variable name for reporting
@throws IllegalArgumentException if the number is less or equal to 0
439851
public static void checkPositiveNumber(final Number number, final String name) throws IllegalArgumentException {
    if (number == null || number.doubleValue() <= 0) {
      throw new IllegalArgumentException("Expecting a positive number for " + name);
    }
  }
145845
@SuppressWarnings({"rawtypes", "unchecked"})
    public static <T extends Comparable> void notMax(final T arg, final T max, final String name) {
        
        if(arg == null) {
            throw new IllegalArgumentException(String.format("%s should not be null.", name));
        }
        
        if(arg.compareTo(max) > 0) {
            throw new IllegalArgumentException(String.format("%s cannot be greater than %s", name, max.toString()));
        }
        
    }
1321188
@Action()
    public SomeNotAuditedObject updateNameAndNumber(
            @ParameterLayout(named = "Name")
            final String name,
            @Parameter(optionality = Optionality.OPTIONAL)
            @ParameterLayout(named = "Number")
            final Integer number) {
        setName(name);
        setNumber(number);
        return this;
    }
551367
public static void notNullOrEmpty(Object[] parameter, String name) throws IllegalArgumentException {
		if (parameter == null || parameter.length == 0) {
			throw new IllegalArgumentException(name + " parameter is empty.");
		}
	}
1350942
public static @Nonnull Number requirePositive(String name, Number value) {
        requireNonNull(name, value);
        requirePositive(name, value.intValue());
        return value;
    }
1034658
private static void verify(final String name, final int type) {
        if ((type < HARD) || (type > WEAK)) {
            throw new IllegalArgumentException(name + " must be HARD, SOFT, WEAK.");
        }
    }
984667
public static void isNotNan( double argument,
                                 String name ) {
        if (Double.isNaN(argument)) {
            throw new IllegalArgumentException(CommonI18n.argumentMustBeNumber.text(name));
        }
    }
231840
public static void EQ(long parameter, long expected, String name) throws IllegalArgumentException {
		if (parameter != expected) {
			throw new IllegalArgumentException(String.format("%s is not %d.", name, expected));
		}
	}
181955
public void updateIntegerBelief(String name, int value) {
        introspector.storeBeliefValue(this, name, getIntegerBelief(name) + value);
    }
804950
public static BigDecimal isBetweenExclusive (final BigDecimal aValue,
                                               final String sName,
                                               @Nonnull final BigDecimal aLowerBoundExclusive,
                                               @Nonnull final BigDecimal aUpperBoundExclusive)
  {
    if (isEnabled ())
      return isBetweenExclusive (aValue, () -> sName, aLowerBoundExclusive, aUpperBoundExclusive);
    return aValue;
  }
531171
function BigNumber(number) {
    this.numberStr = number.toString();

    // not a number
    if (isNaN(parseFloat(this.numberStr)) === true
        || isFinite(this.numberStr) === false) {
        throw new Error(number + ' is not a number');
    }
}
637778
public static BigInteger isBetweenInclusive (final BigInteger aValue,
                                               final String sName,
                                               @Nonnull final BigInteger aLowerBoundInclusive,
                                               @Nonnull final BigInteger aUpperBoundInclusive)
  {
    if (isEnabled ())
      return isBetweenInclusive (aValue, () -> sName, aLowerBoundInclusive, aUpperBoundInclusive);
    return aValue;
  }
543945
private static void ensureNumber(Object value) throws ExecutionException {

        if (!isNumber(value)) {
            String message = value.getClass().getCanonicalName() + " can not cast to a Number.";
            LOGGER.error(message);
            throw new ExecutionException(message);
        }
    }
1183312
@ArgumentsChecked
	@Throws(IllegalNullArgumentException.class)
	public static int checkLong(@Nonnull final Number number) {
		Check.notNull(number, "number");
		if (!isInLongRange(number)) {
			throw new IllegalNumberRangeException(number.toString(), LONG_MIN, LONG_MAX);
		}

		return number.intValue();
	}
689868
@Deprecated
    public void setNumber(@Nullable String number) {
        this.number = number;
        this.brand = null;
        this.last4 = null;
    }
844822
public static void notNegative(final Integer input, final String inputName) {
        notNull(input, inputName);

        if (input < 0) {
            throw new IllegalArgumentException("a value of " + input.toString() + " was unexpected for " + maskNullArgument(inputName) + ", it is expected to be positive");
        }
    }
146049
public static void lessThan(long value, long maxValue, String name) {
        if (value <= 0) {
            throw new IllegalArgumentException(name + " should be > 0, current value " + value);
        }
        if (value > maxValue) {
            throw new IllegalArgumentException(name + " should be <= " + maxValue + ", current value " + value);
        }
    }