Java List Of A Class Has A String That Is

[Solved] Java List Of A Class Has A String That Is | Scala - Code Explorer | yomemimo.com
Question : java list of a class has a string that is equal to

Answered by : frail-fish-hir61pmtp796

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

Source : https://stackoverflow.com/questions/18852059/java-list-containsobject-with-field-value-equal-to-x | Last Update : Mon, 25 May 20

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

Code Explorer Popular Question For Scala