Class CollectionUtils

java.lang.Object
org.elasticsearch.xpack.esql.core.util.CollectionUtils

public abstract class CollectionUtils extends Object
  • Constructor Details

    • CollectionUtils

      public CollectionUtils()
  • Method Details

    • isEmpty

      public static boolean isEmpty(Collection<?> col)
    • combine

      public static <T> List<T> combine(List<? extends T> left, List<? extends T> right)
    • combine

      @SafeVarargs public static <T> List<T> combine(Collection<? extends T>... collections)
    • combine

      @SafeVarargs public static <T> List<T> combine(Collection<? extends T> left, T... entries)
    • prependToCopy

      public static <T> List<T> prependToCopy(T element, Collection<T> collection)
      Creates a copy of the given collection with the given element prepended.
      Parameters:
      element - element to prepend
      collection - collection to copy