Package io.smallrye.openapi.api.util
Class ListUtil
java.lang.Object
io.smallrye.openapi.api.util.ListUtil
Util that helps with List operations
- Author:
- Eric Wittmann (eric.wittmann@gmail.com), Phillip Kruger (phillip.kruger@redhat.com)
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> List<T> mergeNullableLists(List<T>... lists) Combines the lists passed into a new list, excluding any null lists given.
-
Method Details
-
mergeNullableLists
Combines the lists passed into a new list, excluding any null lists given. If the resulting list is empty, return null. This method is marked with@SafeVarargsbecause the elements of the lists handled generically and the input/output types match.- Type Parameters:
T- element type of the list- Parameters:
lists- one or more lists to combine- Returns:
- the combined/merged lists or null if the resulting merged list is empty
-