SyntaxFix
Write A Post
Hire A Developer
Questions
If you want to return a boolean value, then you can use something like this (much faster than filter):
players.stream().anyMatch(player -> player.getName().contains(name));