|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.assertj.core.util.Iterables
public final class Iterables
Utility methods related to Iterables.
| Method Summary | ||
|---|---|---|
static boolean |
isNullOrEmpty(Iterable<?> iterable)
Indicates whether the given Iterable is null or empty. |
|
static
|
nonNullElementsIn(Iterable<? extends T> i)
Returns all the non- null elements in the given Iterable. |
|
static int |
sizeOf(Iterable<?> iterable)
Returns the size of the given Iterable. |
|
static
|
toArray(Iterable<? extends T> iterable)
Create an array from an Iterable. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static boolean isNullOrEmpty(Iterable<?> iterable)
Iterable is null or empty.
iterable - the given Iterable to check.
true if the given Iterable is null or empty, otherwise false.public static int sizeOf(Iterable<?> iterable)
Iterable.
iterable - the Iterable to get size.
Iterable.
NullPointerException - if given Iterable is null.public static <T> List<T> nonNullElementsIn(Iterable<? extends T> i)
null elements in the given Iterable.
T - the type of elements of the Iterable.i - the given Iterable.
null elements in the given Iterable. An empty list is returned if the given
Iterable is null.public static <T> T[] toArray(Iterable<? extends T> iterable)
Iterable.
T - the type of elements of the Iterable.iterable - an Iterable to translate in an array.
Iterable in an array. null if given Iterable is
null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||