public class EnsureUtil extends Object
| Constructor and Description |
|---|
EnsureUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
ensureNotNull(String parameterName,
Object value)
Ensures that the parameter is not null.
|
static <T> T |
ensureParamInstanceOf(String objectName,
Object object,
Class<T> type)
Ensure the object is of a given type and return the casted object
|
public static void ensureNotNull(String parameterName, Object value)
parameterName - the parameter namevalue - the value to ensure to be not nullIllegalArgumentException - if the parameter value is nullpublic static <T> T ensureParamInstanceOf(String objectName, Object object, Class<T> type)
objectName - the name of the parameterobject - the parameter valuetype - the expected typeIllegalArgumentException - in case object cannot be casted to typeCopyright © 2014–2022 Camunda Services GmbH. All rights reserved.