Accessing to fields of all objects in list

Viewed 98

I have a List<Foo>, where Foo is a class containing a String field named name. I want to know if the List contains a Foo object with it's name equal to "bar".

Is this possible without iterating over each object and testing them one by one ?

I'm using Java 8.

1 Answers
Related