public static class Ensure.ArrayCondition extends Ensure.ObjectCondition
| Constructor and Description |
|---|
ArrayCondition(Object[] values)
Creates a new instance of
Ensure.IterableCondition. |
| Modifier and Type | Method and Description |
|---|---|
void |
isNotEmpty()
Ensures that the given array is not
null and contains at least one element. |
void |
isNotEmpty(String explanation,
Object... args)
Ensures that the given array is not
null and contains at least one element. |
isInstanceOf, isInstanceOf, isNotNull, isNotNull, isNull, isNullpublic ArrayCondition(@CheckForNull
Object[] values)
Ensure.IterableCondition.values - value of the conditionpublic void isNotEmpty()
null and contains at least one element. Additionally, ensures
that each element of the array is not null.AssertionError - if the array is empty (or null), or at least one array element is null.@FormatMethod public void isNotEmpty(String explanation, Object... args)
null and contains at least one element. Additionally, ensures
that each element of the array is not null.explanation - a formatted message explaining the assertionargs - Arguments referenced by the format specifiers in the formatted explanation. If there are more
arguments than format specifiers, the extra arguments are ignored. The number of arguments is
variable and may be zero.AssertionError - if the array is empty (or null), or at least one array element is null.Copyright © 2018. All rights reserved.