📅  最后修改于: 2022-03-11 14:52:34.045000             🧑  作者: Mango
public boolean containsName(final List list, final String name){
return list.stream().map(MyObject::getName).filter(name::equals).findFirst().isPresent();
}