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 void
assertNotEmpty
(boolean[] array, String message) static void
assertNotEmpty
(byte[] array, String message) static void
assertNotEmpty
(char[] array, String message) static void
assertNotEmpty
(double[] array, String message) static void
assertNotEmpty
(float[] array, String message) static void
assertNotEmpty
(int[] array, String message) static void
assertNotEmpty
(long[] array, String message) static void
assertNotEmpty
(short[] array, String message) static void
assertNotEmpty
(Object[] array, String message) static void
assertNotEmpty
(String s, String message) static void
assertNotEmpty
(Collection<?> collection, String message) static void
assertNotEmpty
(Collection<?> collection, String message, Object... messageParameters) static void
static void
assertNotNull
(Object o, String message) Asserts that the given object is notnull
.static void
assertTrue
(boolean condition, String message) static void
assertTrue
(boolean condition, String message, Object... messageParameters) static void
assertValueNotNull
(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
-