Is there a method that finds the first matching element with a condition? In List In Java 8 as C # Enumerable # First and Scala List # find?

advertisements

Like C# LINQ Enumerable#First with delegate method and Scala List#find method, In Java8, is there a method that finds first matched element with a condition in list?


list.stream().filter(predicate).findFirst();