Class Iterables
java.lang.Object
com.atlassian.gadgets.dashboard.util.Iterables
Convenience methods for dealing with
Iterables, since we want to avoid introducing a dependency on Google Collections
in our public API-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Iterable<T>checkContentsNotNull(Iterable<T> iterable) Checks every element of anIterableto make sure that none of the elements arenullstatic booleanelementsEqual(Iterable<?> i1, Iterable<?> i2) Compares twoIterables to determine if they are of equal lengths and contain equal elements in the same order.
-
Method Details
-
elementsEqual
Compares twoIterables to determine if they are of equal lengths and contain equal elements in the same order.- Parameters:
i1- the firstIterableto comparei2- the secondIterableto compare- Returns:
trueif the twoIterables contain equal elements in the same order,falseotherwise
-
checkContentsNotNull
Checks every element of anIterableto make sure that none of the elements arenull- Type Parameters:
T- the type contained in theIterable- Parameters:
iterable- theIterableto check- Returns:
- the
Iterablethat was passed in
-