Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java 8 filter first

return dataSource.getParkingLots()
                 .stream()
                 .filter(parkingLot -> Objects.equals(parkingLot.getId(), id))
                 .findFirst()
                 .orElse(null);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #java #filter
ADD COMMENT
Topic
Name
8+3 =