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 aCollection
containing the intersection of the givenCollection
s.
-
Method Details
-
intersection
@Nonnull public static <T> Collection<T> intersection(@Nonnull Collection<? extends T> first, @Nonnull Collection<? extends T> second) Returns aCollection
containing the intersection of the givenCollection
s.- 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
-