public class IllegalArgumentExceptionThrower extends ExceptionThrower
| Modifier and Type | Method and Description |
|---|---|
static IllegalArgumentExceptionThrower |
getInstance()
Return the IllegalargumentExceptionThrower singleton instance.
|
void |
throwIfEmptyOrNull(Collection<?> collection,
String message,
Object... messageParameters)
If parameter collection is empty or null, throw a RuntimeException.
|
void |
throwIfEmptyOrNull(Map<?,?> map,
String message,
Object... messageParameters)
If parameter map is empty or null, throw a RuntimeException.
|
void |
throwIfEmptyOrNull(Object[] array,
String message,
Object... messageParameters)
If parameter array is empty or null, throw a RuntimeException.
|
void |
throwIfNull(Object obj,
String message,
Object... messageParameters)
If parameter obj is null, throw a RuntimeException.
|
void |
throwIfTrue(boolean condition,
String message,
Object... messageParameters)
If condition is true, throw a RuntimeException.
|
createExceptionMessagepublic static IllegalArgumentExceptionThrower getInstance()
public void throwIfTrue(boolean condition,
String message,
Object... messageParameters)
throwIfTrue in class ExceptionThrowermessage - The exception's message.messageParameters - The exception message's parameters.ExceptionThrower.throwIfTrue(boolean,
java.lang.String, java.lang.Object[])public void throwIfNull(Object obj, String message, Object... messageParameters) throws IllegalArgumentException
throwIfNull in class ExceptionThrowerIllegalArgumentExceptionExceptionThrower.throwIfNull(java.lang.Object,
java.lang.String, java.lang.Object[])public void throwIfEmptyOrNull(Collection<?> collection, String message, Object... messageParameters)
throwIfEmptyOrNull in class ExceptionThrowerExceptionThrower.throwIfEmptyOrNull(java.util.Collection,
java.lang.String, java.lang.Object[])public void throwIfEmptyOrNull(Map<?,?> map, String message, Object... messageParameters)
throwIfEmptyOrNull in class ExceptionThrowerExceptionThrower.throwIfEmptyOrNull(java.util.Map,
java.lang.String, java.lang.Object[])public void throwIfEmptyOrNull(Object[] array, String message, Object... messageParameters)
throwIfEmptyOrNull in class ExceptionThrowerExceptionThrower.throwIfEmptyOrNull(java.lang.Object[],
java.lang.String, java.lang.Object[])Copyright © 2014. All rights reserved.