Package dev.aherscu.qa.testing.utils
Class IterableUtils
- java.lang.Object
-
- dev.aherscu.qa.testing.utils.IterableUtils
-
public final class IterableUtils extends Object
Iterable utilities.- Author:
- Adrian Herscu
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> Iterable<T>
iterable(Iterator<T> iterator)
static List<String>
toString(Iterable<?> i)
Converts an iterable of objects to a list of strings by callingString.toString()
on each element.
-
-
-
Method Detail
-
iterable
public static <T> Iterable<T> iterable(Iterator<T> iterator)
- Type Parameters:
T
- iterated type- Parameters:
iterator
- the iterator to wrap- Returns:
- the iterable over specified iterator
-
toString
public static List<String> toString(Iterable<?> i)
Converts an iterable of objects to a list of strings by callingString.toString()
on each element.- Parameters:
i
- the iterable- Returns:
- the list of strings
-
-