private AddonlyKeylessHash<EntryInfo, Object> createParentChildrenMap() {
    Map<EntryInfo, List<EntryInfo>> map = new HashMap<>();
    for (EntryInfo info : getEntriesMap().values()) {
      if (info.isDirectory && !map.containsKey(info)) map.put(info, new SmartList<>());
      if (info.parent != null) {
        List<EntryInfo> parentChildren = map.get(info.parent);
        if (parentChildren == null) map.put(info.parent, parentChildren = new SmartList<>());
        parentChildren.add(info);
      }
    }

    AddonlyKeylessHash<EntryInfo, Object> result = new AddonlyKeylessHash<>(map.size(), ourKeyValueMapper);
    for (List<EntryInfo> children : map.values()) {
      int numberOfChildren = children.size();
      if (numberOfChildren == 1) {
        result.add(children.get(0));
      }
      else if (numberOfChildren > 1) {
        result.add(children.toArray(new EntryInfo[numberOfChildren]));
      }
    }
    return result;
  }
private AddonlyKeylessHash<EntryInfo, Object> createParentChildrenMap()