Class CollectionUtils

java.lang.Object
io.github.mfvanek.pg.utils.CollectionUtils

public final class CollectionUtils extends Object
  • Method Details

    • intersection

      @Nonnull public static <T> Collection<T> intersection(@Nonnull Collection<? extends T> first, @Nonnull Collection<? extends T> second)
      Returns a Collection containing the intersection of the given Collections.
      Type Parameters:
      T - the generic type that is able to represent the types contained in both input collections.
      Parameters:
      first - the first collection, cannot be null
      second - the second collection, cannot be null
      Returns:
      the intersection of the two collections