Skip to content

Instantly share code, notes, and snippets.

@aruld

aruld/GoogleVsApple.java

Last active Oct 11, 2015
Embed
What would you like to do?
MyList usage with exists() API
// Run with -Xbootclasspath/p:target/classes as ReferencePipeline access is now package local, so use this trick
List<Tweet> googleTweets3 = tweets.stream().filter(tweet -> (new MyList<>(google).stream().exists(tweet.text::contains))).collect(toList());
List<Tweet> appleTweets3 = tweets.stream().filter(tweet -> (new MyList<>(apple).stream().exists(tweet.text::contains))).collect(toList());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment