public final class Contracts extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
assertNotEmpty(String s,
String message) |
static void |
assertNotNull(Object o) |
static void |
assertNotNull(Object o,
String message)
Asserts that the given object is not
null. |
static void |
assertTrue(boolean condition,
String message) |
static void |
assertValueNotNull(Object o,
String name)
Asserts that the given object is not
null. |
public static void assertNotNull(Object o)
public static void assertNotNull(Object o, String message)
null.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.IllegalArgumentException - In case the given object is null.public static void assertValueNotNull(Object o, String name)
null.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.IllegalArgumentException - In case the given object is null.public static void assertTrue(boolean condition,
String message)
Copyright © 2007-2014 Red Hat Middleware, LLC. All Rights Reserved