Добавить в список на основе свойства объекта
#java #if-statement #java-stream #filtering Вопрос: private static CodeList prepareChangeObject(CodeList codeList, CodeList existingCodeList, boolean dataExists) throws EntityValidationException { CodeList UpdatedCodeList = new CodeList(); BeanUtils.copyProperties(codeList, UpdatedCodeList); Set<CodeListData> updatedDataList =UpdatedCodeList.getData().stream().collect(Collectors.toSet()); updatedDataList.addAll(existingCodeList.getData()); List<CodeListData> finalData…