Example usage for Java org.springframework.util Assert fields, constructors, methods, implement or subclass
The text is from its open source code.
void | doesNotContain(@Nullable String textToSearch, String substring, String message) Assert that the given text does not contain the given substring. |
void | doesNotContain(@Nullable String textToSearch, String substring, Supplier Assert that the given text does not contain the given substring. |
void | doesNotContain(@Nullable String textToSearch, String substring) Assert that the given text does not contain the given substring. |
void | hasLength(@Nullable String text) Assert that the given String is not empty; that is, it must not be null and not the empty String. |
void | hasLength(@Nullable String text, String message) Assert that the given String is not empty; that is, it must not be null and not the empty String. |
void | hasLength(@Nullable String text, Supplier Assert that the given String is not empty; that is, it must not be null and not the empty String. |
void | hasText(@Nullable String text) Assert that the given String contains valid text content; that is, it must not be null and must contain at least one non-whitespace character. |
void | hasText(@Nullable String text, String message) Assert that the given String contains valid text content; that is, it must not be null and must contain at least one non-whitespace character. |
void | hasText(@Nullable String text, Supplier Assert that the given String contains valid text content; that is, it must not be null and must contain at least one non-whitespace character. |
void | isAssignable(Class> superType, Class> subType) Assert that superType.isAssignableFrom(subType) is true . |
void | isAssignable(Class> superType, @Nullable Class> subType, String message) Assert that superType.isAssignableFrom(subType) is true . |
void | isAssignable(Class> superType, @Nullable Class> subType, Supplier Assert that superType.isAssignableFrom(subType) is true . |
void | isInstanceOf(Class> type, @Nullable Object obj, String message) Assert that the provided object is an instance of the provided class. |
void | isInstanceOf(Class> type, @Nullable Object obj, Supplier Assert that the provided object is an instance of the provided class. |
void | isInstanceOf(Class> type, @Nullable Object obj) Assert that the provided object is an instance of the provided class. |
void | isNull(@Nullable Object object) Assert that an object is null . |
void | isNull(@Nullable Object object, String message) Assert that an object is null . |
void | isNull(@Nullable Object object, Supplier Assert that an object is null . |
void | isTrue(boolean expression, String message) Assert a boolean expression, throwing an IllegalArgumentException if the expression evaluates to false . |
void | isTrue(boolean expression, Supplier Assert a boolean expression, throwing an IllegalArgumentException if the expression evaluates to false . |
void | isTrue(boolean expression) Assert a boolean expression, throwing an IllegalArgumentException if the expression evaluates to false . |
void | noNullElements(@Nullable Object[] array) Assert that an array contains no null elements. |
void | noNullElements(@Nullable Object[] array, String message) Assert that an array contains no null elements. |
void | noNullElements(@Nullable Object[] array, Supplier Assert that an array contains no null elements. |
void | noNullElements(@Nullable Collection> collection, String message) Assert that a collection contains no null elements. |
void | noNullElements(@Nullable Collection> collection, Supplier Assert that a collection contains no null elements. |
void | notEmpty(@Nullable Object[] array, String message) Assert that an array contains elements; that is, it must not be null and must contain at least one element. |
void | notEmpty(@Nullable Object[] array, Supplier Assert that an array contains elements; that is, it must not be null and must contain at least one element. |
void | notEmpty(@Nullable Collection> collection, String message) Assert that a collection contains elements; that is, it must not be null and must contain at least one element. |
void | notEmpty(@Nullable Collection> collection, Supplier Assert that a collection contains elements; that is, it must not be null and must contain at least one element. |
void | notEmpty(@Nullable Map, ?> map, String message) Assert that a Map contains entries; that is, it must not be null and must contain at least one entry. |
void | notEmpty(@Nullable Map, ?> map, Supplier Assert that a Map contains entries; that is, it must not be null and must contain at least one entry. |
void | notEmpty(@Nullable Object[] array) Assert that an array contains elements; that is, it must not be null and must contain at least one element. |
void | notEmpty(@Nullable Collection> collection) Assert that a collection contains elements; that is, it must not be null and must contain at least one element. |
void | notEmpty(@Nullable Map, ?> map) Assert that a Map contains entries; that is, it must not be null and must contain at least one entry. |
void | notNull(@Nullable Object object) Assert that an object is not null . |
void | notNull(@Nullable Object object, String message) Assert that an object is not null . |
void | notNull(@Nullable Object object, Supplier Assert that an object is not null . |
void | state(boolean expression) Assert a boolean expression, throwing an IllegalStateException if the expression evaluates to false . |
void | state(boolean expression, String message) Assert a boolean expression, throwing an IllegalStateException if the expression evaluates to false . |
void | state(boolean expression, Supplier Assert a boolean expression, throwing an IllegalStateException if the expression evaluates to false . |