Answers for "java list of a class has a string that is equal to"

0

java list of a class has a string that is equal to

public boolean containsName(final List<MyObject> list, final String name){
    return list.stream().map(MyObject::getName).filter(name::equals).findFirst().isPresent();
}
Posted by: Guest on May-18-2020

Code answers related to "java list of a class has a string that is equal to"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language