Integer sortMax = customerAttributesTextUpdateParams.stream().filter(e->e.getSort()!=null).max(Comparator.comparing(CustomerAttributesTextUpdateParam::getSort)).get().getSort();
Integer sortMax = customerAttributesTextUpdateParams.stream().filter(e->e.getSort()!=null).max(Comparator.comparing(CustomerAttributesTextUpdateParam::getSort)).get().getSort();