Package org.goplanit.utils.containers
Class ListUtils
- java.lang.Object
-
- org.goplanit.utils.containers.ListUtils
-
public class ListUtils extends Object
Utilities for lists
-
-
Constructor Summary
Constructors Constructor Description ListUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> T
getFirstValue(List<T> list)
Get first entry of liststatic <T> T
getLastValue(List<T> list)
Get last entry of liststatic <T> List<Pair<T,T>>
getPairPermutations(List<T> list, boolean keepSelfPermutation)
-
-
-
Method Detail
-
getFirstValue
public static <T> T getFirstValue(List<T> list)
Get first entry of list- Type Parameters:
T
- type- Parameters:
list
- to use- Returns:
- first entry, null if empty or null
-
getLastValue
public static <T> T getLastValue(List<T> list)
Get last entry of list- Type Parameters:
T
- type- Parameters:
list
- to use- Returns:
- last entry, null if empty or null
-
-