collect

public static @Unmodifiable() LinkedHashMap<String, T> collect<T extends ProcessedCategory>(Iterable<T> categories)(source)

Collect a list of categories into a map that can be used by MoulConfigEditor. Also checks that all ids are unique and all categories with a parent are ordered correctly