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