public final class Validate extends Object
| Constructor and Description |
|---|
Validate() |
| Modifier and Type | Method and Description |
|---|---|
static void |
executionNotNull(Object obj,
String messageFormat,
Object... params)
Checks that obj is not null, throws exception if it is.
|
static void |
notNull(Object obj,
String message)
Checks that object is not null, throws exception if it is.
|
static void |
notNullOrEmpty(CharSequence string,
String message)
Checks that the specified String is not null or empty,
throws exception if it is.
|
static void |
stateNotNull(Object obj,
String message)
Checks that obj is not null, throws exception if it is.
|
public static void notNull(Object obj, String message) throws IllegalArgumentException
obj - The object to checkmessage - The exception messageIllegalArgumentException - Thrown if obj is nullpublic static void notNullOrEmpty(CharSequence string, String message) throws IllegalArgumentException
string - The object to checkmessage - The exception messageIllegalArgumentException - Thrown if obj is nullpublic static void stateNotNull(Object obj, String message) throws IllegalStateException
obj - The object to checkmessage - The exception messageIllegalStateException - Thrown if obj is nullpublic static void executionNotNull(Object obj, String messageFormat, Object... params) throws ExecutionException
obj - The object to checkmessage - The exception messageparams - The exception message parametersExecutionException - Thrown if object is nullCopyright © 2014 JBoss by Red Hat. All rights reserved.