public final class RequireUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
requireArg(boolean condition,
String exceptionMessage)
Throws an
IllegalArgumentException if the given condition is not met |
static void |
requireIOCondition(boolean condition,
String exceptionMessage)
Throws an
IOException if the given condition is not met |
static void |
requireNotBlank(String value,
String exceptionMessage)
Throws an
IllegalArgumentException if the given string is blank |
static void |
requireNotNullArg(Object arg,
String exceptionMessage)
Throws an
IllegalArgumentException if the given argument is null |
static void |
requireState(boolean condition,
String exceptionMessage)
Throws an
IllegalStateException if the given condition is not met |
public static void requireNotNullArg(Object arg, String exceptionMessage)
IllegalArgumentException if the given argument is nullarg - exceptionMessage - public static void requireArg(boolean condition,
String exceptionMessage)
IllegalArgumentException if the given condition is not metcondition - exceptionMessage - public static void requireNotBlank(String value, String exceptionMessage)
IllegalArgumentException if the given string is blankvalue - stringexceptionMessage - public static void requireIOCondition(boolean condition,
String exceptionMessage)
throws IOException
IOException if the given condition is not metcondition - exceptionMessage - IOExceptionpublic static void requireState(boolean condition,
String exceptionMessage)
IllegalStateException if the given condition is not metcondition - exceptionMessage - IllegalStateExceptionCopyright © 2018 sejda. All rights reserved.