From 7028b4758b701ce34b9391bc673aedc8847b78ab Mon Sep 17 00:00:00 2001 From: Gaurav Kumar Date: Thu, 25 Feb 2016 16:51:58 -0500 Subject: [PATCH] finished word cloud lab gsk6 sj166 --- src/WordCloud.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/WordCloud.java b/src/WordCloud.java index fab3e35..82bf2fc 100644 --- a/src/WordCloud.java +++ b/src/WordCloud.java @@ -118,8 +118,10 @@ private static List readWords (Scanner input, UnaryOperator xform, Predicate select) { List contents = Arrays.stream(input.useDelimiter(END_OF_FILE).next().split(WHITESPACE)) - // TODO: add map and filter calls using parameters - .collect(Collectors.toList()); + // TODO: add map and filter calls using parameters + .filter(select) + .map(xform) + .collect(Collectors.toList()); input.close(); return contents; }