org.hibernate.validator.internal.util
Class Contracts
java.lang.Object
org.hibernate.validator.internal.util.Contracts
public final class Contracts
- extends Object
- Author:
- Gunnar Morling, Hardy Ferentschik, Kevin Pollet (C) 2012 SERLI
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
assertNotNull
public static void assertNotNull(Object o)
assertNotNull
public static void assertNotNull(Object o,
String message)
- Asserts that the given object is not
null.
- Parameters:
o - The object to check.message - A message text which will be used as message of the resulting
exception if the given object is null.
- Throws:
IllegalArgumentException - In case the given object is null.
assertValueNotNull
public static void assertValueNotNull(Object o,
String name)
- Asserts that the given object is not
null.
- 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 is null.
- Throws:
IllegalArgumentException - In case the given object is null.
assertTrue
public static void assertTrue(boolean condition,
String message)
assertNotEmpty
public static void assertNotEmpty(String s,
String message)
Copyright © 2012 Oracle Corporation. All Rights Reserved.