Stream and filter one list based on other list

Viewed 104

I have a list of objects. Those objects have a string variable. I also have a list of strings.

So something like this.

List<A> listA;

class A {

String x;

}
List<String> listB;

What I want to be able to do is stream and filter listA, based on whether x contains any of the string objects in List B.

Is this doable ?

3 Answers
Related