void () { Map<? extends CharSequence, ? extends List<? extends CharSequence>> map = getList() .stream().filter(Objects::nonNull).collect(Collectors.toMap(Function.identity(), this::asList)); System.out.println(map); }