List<YourBean> distinctList = list.stream().collect(
Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(o -> o.getMaterial().getId()))),
ArrayList::new));