Package io.github.mfvanek.pg.utils
Class CollectionUtils
java.lang.Object
io.github.mfvanek.pg.utils.CollectionUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Collection<T>intersection(Collection<? extends T> first, Collection<? extends T> second) Returns aCollectioncontaining the intersection of the givenCollections.
-
Method Details
-
intersection
@Nonnull public static <T> Collection<T> intersection(@Nonnull Collection<? extends T> first, @Nonnull Collection<? extends T> second) Returns aCollectioncontaining the intersection of the givenCollections.- 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 nullsecond- the second collection, cannot be null- Returns:
- the intersection of the two collections
-