public void sort() {
        for (String key : map.keySet()) {
            List<PathPattern<U>> list = map.get(key);

            if (list != null) {
                Collections.sort(list);
            }
        }
    }