public boolean containsName(final List<MyObject> list, final String name){ return list.stream().map(MyObject::getName).filter(name::equals).findFirst().isPresent(); }