private Boolean sameStatus(Integer sourceCompared, Integer targetCompared) { if (Func.isNull(sourceCompared)) { return true; } return Func.equals(sourceCompared, targetCompared); } List<RemarkConfiguredVO> subList = list.stream().filter(e -> Func.equals(parent.getId() , e.getParentId()) && sameStatus(param.getStatus(), e.getStatus())).collect(Collectors.toList());