Class Contracts
java.lang.Object
org.hibernate.validator.internal.util.Contracts
- Author:
- Gunnar Morling, Hardy Ferentschik, Kevin Pollet <kevin.pollet@serli.com> (C) 2012 SERLI
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidassertNotEmpty(boolean[] array, String message) static voidassertNotEmpty(byte[] array, String message) static voidassertNotEmpty(char[] array, String message) static voidassertNotEmpty(double[] array, String message) static voidassertNotEmpty(float[] array, String message) static voidassertNotEmpty(int[] array, String message) static voidassertNotEmpty(long[] array, String message) static voidassertNotEmpty(short[] array, String message) static voidassertNotEmpty(Object[] array, String message) static voidassertNotEmpty(String s, String message) static voidassertNotEmpty(Collection<?> collection, String message) static voidassertNotEmpty(Collection<?> collection, String message, Object... messageParameters) static voidstatic voidassertNotNull(Object o, String message) Asserts that the given object is notnull.static voidassertTrue(boolean condition, String message) static voidassertTrue(boolean condition, String message, Object... messageParameters) static voidassertValueNotNull(Object o, String name) Asserts that the given object is notnull.
-
Method Details
-
assertNotNull
-
assertNotNull
Asserts that the given object is notnull.- Parameters:
o- The object to check.message- A message text which will be used as message of the resulting exception if the given object isnull.- Throws:
IllegalArgumentException- In case the given object isnull.
-
assertValueNotNull
Asserts that the given object is notnull.- Parameters:
o- The object to check.name- The name of the value to check. A message of the form "<name> must not be null" will be used as message of the resulting exception if the given object isnull.- Throws:
IllegalArgumentException- In case the given object isnull.
-
assertTrue
-
assertTrue
-
assertNotEmpty
-
assertNotEmpty
-
assertNotEmpty
public static void assertNotEmpty(Collection<?> collection, String message, Object... messageParameters) -
assertNotEmpty
-
assertNotEmpty
-
assertNotEmpty
-
assertNotEmpty
-
assertNotEmpty
-
assertNotEmpty
-
assertNotEmpty
-
assertNotEmpty
-
assertNotEmpty
-