public static class Ensure.IterableCondition extends Ensure.ObjectCondition
| Constructor and Description |
|---|
IterableCondition(Iterable<?> value)
Creates a new instance of
IterableCondition. |
| Modifier and Type | Method and Description |
|---|---|
void |
isNotEmpty()
Ensures that the given iterable is not
null and contains at least one element. |
void |
isNotEmpty(String explanation,
Object... args)
Ensures that the given iterable is not
null and contains at least one element. |
isInstanceOf, isInstanceOf, isNotNull, isNotNull, isNull, isNullpublic IterableCondition(@CheckForNull
Iterable<?> value)
IterableCondition.value - value of the conditionpublic void isNotEmpty()
null and contains at least one element. Additionally, ensures
that each element of the iterable is not null.AssertionError - if the iterable is empty (or null), or at least one iterable 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 iterable 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 iterable is empty (or null), or at least one iterable element is null.Copyright © 2018. All rights reserved.