Below is the code snippet, I want to set isDeleted, modifiedDate & modifiedBy in a single statement using Stream API.
How can I do it?
List<CtStaticIPDetailsList> ctStaticIPDetailsList =new ArrayList()<>;
ctStaticIPDetailsList.stream().forEach(l -> l.setIsDeleted(true));
ctStaticIPDetailsList.stream()
.forEach(l -> l.setModifiedDate(new Date()));
ctStaticIPDetailsList.stream()
.forEach(l -> l.setModifiedBy(boqCreationDTO.getUserId()));