public final <OtherType> Map<OtherType, ListType> groupingBy(Function<Type, OtherType> classifier) {
        return items.stream().collect(Collectors.groupingBy(classifier,
                                                            LinkedHashMap::new,
                                                            Collectors.collectingAndThen(toList(),
                                                                                         (list) -> constructor.apply(list, false))));
    }
Returns the items grouped by the given classifier.
vespajlib/src/main/java/com/yahoo/collections/AbstractFilteringList.java