public abstract class AssertArgument extends Object
| Constructor and Description |
|---|
AssertArgument() |
| Modifier and Type | Method and Description |
|---|---|
static void |
isInstanceOf(Object arg,
Class<?> clazz,
String argName)
Assert that the argument is an instance of the specified class.
|
static void |
isNotEmpty(String arg,
String argName)
Assert that the argument is not empty.
|
static void |
isNotNull(Object arg,
String argName)
Assert that the argument is not null.
|
static void |
isNotNullAndNotEmpty(Collection<?> arg,
String argName)
Assert that the argument is neither null nor empty.
|
static void |
isNotNullAndNotEmpty(Map<?,?> arg,
String argName)
Assert that the argument is neither null nor empty.
|
static void |
isNotNullAndNotEmpty(Object[] arg,
String argName)
Assert that the argument is neither null nor empty.
|
static void |
isNotNullAndNotEmpty(String arg,
String argName)
Assert that the argument is neither null nor empty.
|
public static void isNotNull(Object arg, String argName) throws IllegalArgumentException
arg - Argument.argName - Argument name.IllegalArgumentException - Argument is null.public static void isNotEmpty(String arg, String argName) throws IllegalArgumentException
arg - Argument.argName - Argument name.IllegalArgumentException - Argument is not null, but is empty.public static void isNotNullAndNotEmpty(String arg, String argName) throws IllegalArgumentException
arg - Argument.argName - Argument name.IllegalArgumentException - Argument is null or empty.public static void isNotNullAndNotEmpty(Object[] arg, String argName) throws IllegalArgumentException
arg - Argument.argName - Argument name.IllegalArgumentException - Argument is null or empty.public static void isNotNullAndNotEmpty(Collection<?> arg, String argName) throws IllegalArgumentException
arg - Argument.argName - Argument name.IllegalArgumentException - Argument is null or empty.public static void isNotNullAndNotEmpty(Map<?,?> arg, String argName) throws IllegalArgumentException
arg - Argument.argName - Argument name.IllegalArgumentException - Argument is null or empty.public static void isInstanceOf(Object arg, Class<?> clazz, String argName) throws IllegalArgumentException
arg - Argument.clazz - The Class type to check.argName - Argument name.IllegalArgumentException - Argument is null or empty.Copyright © 2020. All rights reserved.