public final class IllegalArguments extends Object
Modifier and Type | Method and Description |
---|---|
static void |
ensureGreater(String name, BigInteger value, BigInteger lower) |
static void |
ensureGreater(String name, Integer value, Integer lower) |
static void |
ensureGreaterOrEqual(String name, Integer value, Integer lower) |
static void |
ensureInRange(String name, Integer value, Integer from, Integer to) |
static void |
ensureLesser(String name, Integer value, Integer higher) |
static void |
ensureLesserOrEqual(String name, Integer value, Integer higher) |
static void |
ensureNotEmpty(String name, boolean trim, String value)
Ensure not empty.
|
static void |
ensureNotEmpty(String name, byte[] value)
Ensure not empty.
|
static void |
ensureNotEmpty(String name, CharSequence value)
Ensure not empty.
|
static void |
ensureNotEmpty(String name, Collection<?> value)
Ensure not empty.
|
static void |
ensureNotEmpty(String name, Map<?,?> value)
Ensure not empty.
|
static void |
ensureNotEmpty(String name, Object[] value)
Ensure not empty.
|
static void |
ensureNotEmpty(String name, Properties value)
Ensure not empty.
|
static void |
ensureNotEmpty(String name, String value)
Ensure not empty.
|
static void |
ensureNotEmptyContent(String name, boolean trim, String[] value)
Ensures that the string array instance is not null and that it has entries that are not null or empty.
|
static void |
ensureNotEmptyContent(String name, String[] value)
Ensures that the string array instance is not null and that it has entries that are not null or empty either without trimming the string.
|
static void |
ensureNotNull(String name, Object value)
Ensure not null.
|
static void |
ensureNotZero(String name, Integer value)
Ensure not zero.
|
public static void ensureNotNull(String name, Object value)
name
- Name
value
- Value
IllegalArgumentException
- if value is null
public static void ensureNotEmpty(String name, String value)
name
- Name
value
- Value
IllegalArgumentException
- if value is null or empty
public static void ensureNotEmpty(String name, CharSequence value)
name
- Name
value
- Value
IllegalArgumentException
- if value is null or empty
public static void ensureNotEmpty(String name, boolean trim, String value)
name
- Name
trim
- Trim value before check if true, don't otherwise
value
- Value
IllegalArgumentException
- if value is null or empty
public static void ensureNotEmpty(String name, Object[] value)
name
- Name
value
- Value
IllegalArgumentException
- if value is null or empty
public static void ensureNotEmpty(String name, byte[] value)
name
- Name
value
- Value
IllegalArgumentException
- if value is null or empty
public static void ensureNotEmpty(String name, Collection<?> value)
name
- Name
value
- Value
IllegalArgumentException
- if value is null or empty
public static void ensureNotEmpty(String name, Properties value)
name
- Name
value
- Value
IllegalArgumentException
- if value is null or empty
public static void ensureNotEmpty(String name, Map<?,?> value)
name
- Name
value
- Value
IllegalArgumentException
- if value is null or empty
public static void ensureNotEmptyContent(String name, String[] value)
name
- Name
value
- Value
IllegalArgumentException
- if value is null or empty
public static void ensureNotEmptyContent(String name, boolean trim, String[] value)
name
- Name
trim
- Trim flag
value
- Value
IllegalArgumentException
- if value is null or empty
public static void ensureNotZero(String name, Integer value)
name
- Name
value
- Value
IllegalArgumentException
- if value is null or zero
public static void ensureInRange(String name, Integer value, Integer from, Integer to)
public static void ensureGreaterOrEqual(String name, Integer value, Integer lower)
public static void ensureGreater(String name, BigInteger value, BigInteger lower)