public final class EnsureUtil extends Object
Constructor and Description |
---|
EnsureUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
ensureAtLeastOneNotEmpty(Class<? extends ProcessEngineException> exceptionClass,
String message,
String... values) |
static void |
ensureAtLeastOneNotEmpty(String message,
String... values) |
static void |
ensureAtLeastOneNotNull(Class<? extends ProcessEngineException> exceptionClass,
String message,
Object... values) |
static void |
ensureAtLeastOneNotNull(String message,
Object... values) |
static void |
ensureInstanceOf(Class<? extends ProcessEngineException> exceptionClass,
String variableName,
Object value,
Class<?> expectedClass) |
static void |
ensureInstanceOf(Class<? extends ProcessEngineException> exceptionClass,
String message,
String variableName,
Object value,
Class<?> expectedClass) |
static void |
ensureInstanceOf(String variableName,
Object value,
Class<?> expectedClass) |
static void |
ensureInstanceOf(String message,
String variableName,
Object value,
Class<?> expectedClass) |
static void |
ensureNotContainsEmptyString(Class<? extends ProcessEngineException> exceptionClass,
String variableName,
Collection<String> values) |
static void |
ensureNotContainsEmptyString(Class<? extends ProcessEngineException> exceptionClass,
String message,
String variableName,
Collection<String> values) |
static void |
ensureNotContainsEmptyString(String variableName,
Collection<String> values) |
static void |
ensureNotContainsEmptyString(String message,
String variableName,
Collection<String> values) |
static void |
ensureNotContainsNull(Class<? extends ProcessEngineException> exceptionClass,
String message,
String variableName,
Collection<?> values) |
static void |
ensureNotContainsNull(String variableName,
Collection<?> values) |
static void |
ensureNotContainsNull(String message,
String variableName,
Collection<?> values) |
static void |
ensureNotEmpty(Class<? extends ProcessEngineException> exceptionClass,
String variableName,
Collection collection) |
static void |
ensureNotEmpty(Class<? extends ProcessEngineException> exceptionClass,
String variableName,
Map map) |
static void |
ensureNotEmpty(Class<? extends ProcessEngineException> exceptionClass,
String variableName,
String value) |
static void |
ensureNotEmpty(Class<? extends ProcessEngineException> exceptionClass,
String message,
String variableName,
Collection collection) |
static void |
ensureNotEmpty(Class<? extends ProcessEngineException> exceptionClass,
String message,
String variableName,
Map map) |
static void |
ensureNotEmpty(Class<? extends ProcessEngineException> exceptionClass,
String message,
String variableName,
String value) |
static void |
ensureNotEmpty(String variableName,
Collection collection) |
static void |
ensureNotEmpty(String variableName,
Map map) |
static void |
ensureNotEmpty(String variableName,
String value) |
static void |
ensureNotEmpty(String message,
String variableName,
Collection collection) |
static void |
ensureNotEmpty(String message,
String variableName,
Map map) |
static void |
ensureNotEmpty(String message,
String variableName,
String value) |
static void |
ensureNotNull(Class<? extends ProcessEngineException> exceptionClass,
String variableName,
Object... values) |
static void |
ensureNotNull(Class<? extends ProcessEngineException> exceptionClass,
String variableName,
Object value) |
static void |
ensureNotNull(Class<? extends ProcessEngineException> exceptionClass,
String message,
String variableName,
Object... values) |
static void |
ensureNotNull(Class<? extends ProcessEngineException> exceptionClass,
String message,
String variableName,
Object value) |
static void |
ensureNotNull(String variableName,
Object... values) |
static void |
ensureNotNull(String variableName,
Object value) |
static void |
ensureNotNull(String message,
String variableName,
Object... values) |
static void |
ensureNotNull(String message,
String variableName,
Object value) |
static void |
ensureNull(Class<? extends ProcessEngineException> exceptionClass,
String message,
String variableName,
Object value) |
static void |
ensureNumberOfElements(Class<? extends ProcessEngineException> exceptionClass,
String message,
String variableName,
Collection collection,
int elements) |
static void |
ensureNumberOfElements(String variableName,
Collection collection,
int elements) |
static void |
ensureNumberOfElements(String message,
String variableName,
Collection collection,
int elements) |
static void |
ensureOnlyOneNotNull(Class<? extends ProcessEngineException> exceptionClass,
String message,
Object... values) |
static void |
ensureOnlyOneNotNull(String message,
Object... values) |
static void |
ensurePositive(Class<? extends ProcessEngineException> exceptionClass,
String variableName,
Integer value) |
static void |
ensurePositive(Class<? extends ProcessEngineException> exceptionClass,
String message,
String variableName,
Integer value) |
static void |
ensurePositive(String variableName,
Integer value) |
static void |
ensurePositive(String message,
String variableName,
Integer value) |
protected static String |
formatMessage(String message,
String variableName,
String description) |
protected static String |
formatMessageElement(String element,
String delimiter) |
protected static <T extends ProcessEngineException> |
generateException(Class<T> exceptionClass,
String message,
String variableName,
String description) |
public static void ensureNotNull(Class<? extends ProcessEngineException> exceptionClass, String variableName, Object value)
public static void ensureNotNull(Class<? extends ProcessEngineException> exceptionClass, String message, String variableName, Object value)
public static void ensureNull(Class<? extends ProcessEngineException> exceptionClass, String message, String variableName, Object value)
public static void ensureNotNull(Class<? extends ProcessEngineException> exceptionClass, String variableName, Object... values)
public static void ensureNotNull(String message, String variableName, Object... values)
public static void ensureNotNull(Class<? extends ProcessEngineException> exceptionClass, String message, String variableName, Object... values)
public static void ensureNotEmpty(Class<? extends ProcessEngineException> exceptionClass, String variableName, String value)
public static void ensureNotEmpty(Class<? extends ProcessEngineException> exceptionClass, String message, String variableName, String value)
public static void ensureNotEmpty(String variableName, Collection collection)
public static void ensureNotEmpty(Class<? extends ProcessEngineException> exceptionClass, String variableName, Collection collection)
public static void ensureNotEmpty(String message, String variableName, Collection collection)
public static void ensureNotEmpty(Class<? extends ProcessEngineException> exceptionClass, String message, String variableName, Collection collection)
public static void ensureNotEmpty(Class<? extends ProcessEngineException> exceptionClass, String variableName, Map map)
public static void ensureNotEmpty(Class<? extends ProcessEngineException> exceptionClass, String message, String variableName, Map map)
public static void ensurePositive(Class<? extends ProcessEngineException> exceptionClass, String variableName, Integer value)
public static void ensurePositive(String message, String variableName, Integer value)
public static void ensurePositive(Class<? extends ProcessEngineException> exceptionClass, String message, String variableName, Integer value)
public static void ensureInstanceOf(String variableName, Object value, Class<?> expectedClass)
public static void ensureInstanceOf(Class<? extends ProcessEngineException> exceptionClass, String variableName, Object value, Class<?> expectedClass)
public static void ensureInstanceOf(String message, String variableName, Object value, Class<?> expectedClass)
public static void ensureInstanceOf(Class<? extends ProcessEngineException> exceptionClass, String message, String variableName, Object value, Class<?> expectedClass)
public static void ensureOnlyOneNotNull(Class<? extends ProcessEngineException> exceptionClass, String message, Object... values)
public static void ensureAtLeastOneNotNull(String message, Object... values)
public static void ensureAtLeastOneNotNull(Class<? extends ProcessEngineException> exceptionClass, String message, Object... values)
public static void ensureAtLeastOneNotEmpty(String message, String... values)
public static void ensureAtLeastOneNotEmpty(Class<? extends ProcessEngineException> exceptionClass, String message, String... values)
public static void ensureNotContainsEmptyString(String variableName, Collection<String> values)
public static void ensureNotContainsEmptyString(String message, String variableName, Collection<String> values)
public static void ensureNotContainsEmptyString(Class<? extends ProcessEngineException> exceptionClass, String variableName, Collection<String> values)
public static void ensureNotContainsEmptyString(Class<? extends ProcessEngineException> exceptionClass, String message, String variableName, Collection<String> values)
public static void ensureNotContainsNull(String variableName, Collection<?> values)
public static void ensureNotContainsNull(String message, String variableName, Collection<?> values)
public static void ensureNotContainsNull(Class<? extends ProcessEngineException> exceptionClass, String message, String variableName, Collection<?> values)
public static void ensureNumberOfElements(String variableName, Collection collection, int elements)
public static void ensureNumberOfElements(String message, String variableName, Collection collection, int elements)
public static void ensureNumberOfElements(Class<? extends ProcessEngineException> exceptionClass, String message, String variableName, Collection collection, int elements)
protected static <T extends ProcessEngineException> T generateException(Class<T> exceptionClass, String message, String variableName, String description)
protected static String formatMessage(String message, String variableName, String description)
Copyright © 2018. All rights reserved.