Skip to content

Instantly share code, notes, and snippets.

@aruld
Last active October 11, 2015 12:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aruld/3857601 to your computer and use it in GitHub Desktop.
Save aruld/3857601 to your computer and use it in GitHub Desktop.
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