java - How to filter a list based on the content of another list of a different type? -
i have 2 lists:
list<someobject> objectlist;list<string> stringlist;
while someobject has member name of type string. best way check if stringlist contains string not name of someobject in objectlist?
iterate through objects in objectlist , add each name set<string> (let's call nameset). call nameset.containsall(stringlist).
Comments
Post a Comment