public abstract class ExceptionThrower extends Object
| Constructor and Description |
|---|
ExceptionThrower() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
createExceptionMessage(String message,
Object... messageParameters)
Create a string message by string format.
|
abstract void |
throwIfEmptyOrNull(Collection<?> collection,
String message,
Object... messageParameters)
If parameter collection is empty or null, throw a RuntimeException.
|
abstract void |
throwIfEmptyOrNull(Map<?,?> map,
String message,
Object... messageParameters)
If parameter map is empty or null, throw a RuntimeException.
|
abstract void |
throwIfEmptyOrNull(Object[] array,
String message,
Object... messageParameters)
If parameter array is empty or null, throw a RuntimeException.
|
abstract void |
throwIfNull(Object obj,
String message,
Object... messageParameters)
If parameter obj is null, throw a RuntimeException.
|
abstract void |
throwIfTrue(boolean condition,
String message,
Object... messageParameters)
If condition is true, throw a RuntimeException.
|
public abstract void throwIfTrue(boolean condition,
String message,
Object... messageParameters)
condition - message - The exception's message.messageParameters - The exception message's parameters.public abstract void throwIfNull(Object obj, String message, Object... messageParameters)
obj - message - messageParameters - public abstract void throwIfEmptyOrNull(Collection<?> collection, String message, Object... messageParameters)
collection - message - messageParameters - public abstract void throwIfEmptyOrNull(Map<?,?> map, String message, Object... messageParameters)
map - message - messageParameters - public abstract void throwIfEmptyOrNull(Object[] array, String message, Object... messageParameters)
array - message - messageParameters - Copyright © 2014. All rights reserved.