public final class Iterables
extends java.lang.Object
Iterables.| Modifier and Type | Method and Description |
|---|---|
static boolean |
isNullOrEmpty(java.lang.Iterable<?> iterable)
Indicates whether the given
Iterable is null or empty. |
static <T> java.util.List<T> |
nonNullElementsIn(java.lang.Iterable<T> i)
Returns all the non-
null elements in the given Iterable. |
static int |
sizeOf(java.lang.Iterable<?> iterable)
Returns the size of the given
Iterable. |
public static boolean isNullOrEmpty(java.lang.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(java.lang.Iterable<?> iterable)
Iterable.iterable - the Iterable to get size.Iterable.java.lang.NullPointerException - if given Iterable is null.public static <T> java.util.List<T> nonNullElementsIn(java.lang.Iterable<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.Copyright © 2007-2013 FEST (Fixtures for Easy Software Testing). All Rights Reserved.