MCPcopy Create free account
hub / github.com/apache/commons-lang / isTrue

Method isTrue

src/main/java/org/apache/commons/lang3/Validate.java:497–501  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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

Calls 4

getMessageMethod · 0.95
valueOfMethod · 0.80
formatMethod · 0.65
getMethod · 0.65