public abstract class Assert extends Object
IllegalArgumentException that will
have a non-null/non-empty message.| Constructor and Description |
|---|
Assert() |
| Modifier and Type | Method and Description |
|---|---|
static String |
formatNotEmpty(String prefix)
Return formatted not empty message with given prefix
|
static String |
formatNotNull(String prefix)
Return formatted not null message with given prefix
|
static String |
notEmpty(String string)
Throw an
IllegalArgumentException with a default message if the
string has a length of zero. |
static String |
notEmpty(String message,
String string)
Throw an
IllegalArgumentException with the message if the string
has a length of zero. |
static <V> V[] |
notEmpty(String message,
V[] objects)
Throw an
IllegalArgumentException with the message if the
Object array has a length of zero. |
static <V> V[] |
notEmpty(V[] objects)
Throw an
IllegalArgumentException with a default message if the
Object array has a length of zero. |
static <V> V |
notNull(String message,
V object)
Throw an
IllegalArgumentException with the message if the object
is null. |
static <V> V |
notNull(V object)
Throw an
IllegalArgumentException with a default message if the
object is null. |
public static <V> V notNull(String message, V object) throws IllegalArgumentException
IllegalArgumentException with the message if the object
is null.message - object - IllegalArgumentExceptionpublic static <V> V notNull(V object)
throws IllegalArgumentException
IllegalArgumentException with a default message if the
object is null.object - IllegalArgumentExceptionpublic static <V> V[] notEmpty(String message, V[] objects) throws IllegalArgumentException
IllegalArgumentException with the message if the
Object array has a length of zero.message - objects - IllegalArgumentExceptionpublic static <V> V[] notEmpty(V[] objects)
throws IllegalArgumentException
IllegalArgumentException with a default message if the
Object array has a length of zero.objects - IllegalArgumentExceptionpublic static String notEmpty(String message, String string) throws IllegalArgumentException
IllegalArgumentException with the message if the string
has a length of zero.message - string - IllegalArgumentExceptionpublic static String notEmpty(String string) throws IllegalArgumentException
IllegalArgumentException with a default message if the
string has a length of zero.string - IllegalArgumentExceptionpublic static String formatNotNull(String prefix)
prefix - Copyright © 2011-2015. All Rights Reserved.