Package dev.aherscu.qa.testing.utils
Class ListUtils
- java.lang.Object
-
- dev.aherscu.qa.testing.utils.ListUtils
-
public final class ListUtils extends Object
List utilities.- Author:
- Adrian Herscu
-
-
Method Detail
-
getOrElse
public static <T> T getOrElse(List<T> list, int index, T defaultValue)
- Type Parameters:
T
- type of values in specified list- Parameters:
list
- the list to retrieve fromindex
- the zero-based index to retrievedefaultValue
- the default value if there is no value for specified index- Returns:
- the value at specified index or the default value
-
-