Validate that the argument condition is true; otherwise throwing an exception. This method is useful when validating according to an arbitrary boolean expression, such as validating a primitive number or using your own custom validation expression. Validate.isTrue(i > 0); Validate.
(final boolean expression)
| 495 | * @see #isTrue(boolean, Supplier) |
| 496 | */ |
| 497 | public static void isTrue(final boolean expression) { |
| 498 | if (!expression) { |
| 499 | throw new IllegalArgumentException(DEFAULT_IS_TRUE_EX_MESSAGE); |
| 500 | } |
| 501 | } |
| 502 | |
| 503 | /** |
| 504 | * Validate that the argument condition is {@code true}; otherwise |