Class ListUtil

java.lang.Object
io.smallrye.openapi.api.util.ListUtil

public class ListUtil extends Object
Util that helps with List operations
Author:
Eric Wittmann (eric.wittmann@gmail.com), Phillip Kruger (phillip.kruger@redhat.com)
  • Method Details

    • mergeNullableLists

      @SafeVarargs public static <T> List<T> mergeNullableLists(List<T>... lists)
      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 @SafeVarargs because 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