List<String> (List<Mapping> mappings) { return mappings.stream().map(Mapping::charString).distinct() .sorted(Comparator.comparing(String::length).thenComparing(Comparator.naturalOrder())) .collect(Collectors.toList()); }