@Test(expected = IllegalArgumentException.class) public void testIntSmallestRangeFailLow() { Args.checkRange(-1, 0, 0, "Number"); }
public static int checkRange(final int value, final int lowInclusive, final int highInclusive, final String message) { if (value < lowInclusive || value > highInclusive) { throw illegalArgumentException("%s: %d is out of range [%d, %d]", message, Integer.valueOf(value), Integer.valueOf(lowInclusive), Integer.valueOf(highInclusive)); } return value; }
Args { public static int checkRange(final int value, final int lowInclusive, final int highInclusive, final String message) { if (value < lowInclusive || value > highInclusive) { throw illegalArgumentException("%s: %d is out of range [%d, %d]", message, Integer.valueOf(value), Integer.valueOf(lowInclusive), Integer.valueOf(highInclusive)); } return value; } }
Args { public static int checkRange(final int value, final int lowInclusive, final int highInclusive, final String message) { if (value < lowInclusive || value > highInclusive) { throw illegalArgumentException("%s: %d is out of range [%d, %d]", message, Integer.valueOf(value), Integer.valueOf(lowInclusive), Integer.valueOf(highInclusive)); } return value; } private  Args(); }
Args { public static int checkRange(final int value, final int lowInclusive, final int highInclusive, final String message) { if (value < lowInclusive || value > highInclusive) { throw illegalArgumentException("%s: %d is out of range [%d, %d]", message, Integer.valueOf(value), Integer.valueOf(lowInclusive), Integer.valueOf(highInclusive)); } return value; } private  Args(); static void check(final boolean expression, final String message); static void check(final boolean expression, final String message, final Object... args); static void check(final boolean expression, final String message, final Object arg); static long checkContentLength(final EntityDetails entityDetails); static int checkRange(final int value, final int lowInclusive, final int highInclusive,
                    final String message); static long checkRange(final long value, final long lowInclusive, final long highInclusive,
                    final String message); static T containsNoBlanks(final T argument, final String name); static T notBlank(final T argument, final String name); static T notEmpty(final T argument, final String name); static T notEmpty(final T argument, final String name); static int notNegative(final int n, final String name); static long notNegative(final long n, final String name); static T notNull(final T argument, final String name); static int positive(final int n, final String name); static long positive(final long n, final String name); static T positive(final T timeValue, final String name); }
Args { public static int checkRange(final int value, final int lowInclusive, final int highInclusive, final String message) { if (value < lowInclusive || value > highInclusive) { throw illegalArgumentException("%s: %d is out of range [%d, %d]", message, Integer.valueOf(value), Integer.valueOf(lowInclusive), Integer.valueOf(highInclusive)); } return value; } private  Args(); static void check(final boolean expression, final String message); static void check(final boolean expression, final String message, final Object... args); static void check(final boolean expression, final String message, final Object arg); static long checkContentLength(final EntityDetails entityDetails); static int checkRange(final int value, final int lowInclusive, final int highInclusive,
                    final String message); static long checkRange(final long value, final long lowInclusive, final long highInclusive,
                    final String message); static T containsNoBlanks(final T argument, final String name); static T notBlank(final T argument, final String name); static T notEmpty(final T argument, final String name); static T notEmpty(final T argument, final String name); static int notNegative(final int n, final String name); static long notNegative(final long n, final String name); static T notNull(final T argument, final String name); static int positive(final int n, final String name); static long positive(final long n, final String name); static T positive(final T timeValue, final String name);  }