Got one of the ones above to work, finally.
Update on
word list definitions:
List<
String> avoidWordList = Arrays.asList("one", "two");
List<String> allWordsList = Arrays.asList("There", "were", "two", "people", "who", "always", "said", "one", "thing", "over", "and", "over");
.
.
.
// show all words except those in the avoidWordsList
allWordsList.stream()
.filter(word -> !avoidWordList
.stream().collect(Collectors.toSet())
.contains(word)).collect(Collectors.toList())
.forEach(System.out::println);
--
All the permutations of putting these streaming pieces together can be very confusing and time consuming.
-- mike