private ThreeStateCheckBox.State getSuperItemState(@NotNull MyFileTypeItem subItem) {
    List<MyFileTypeItem> withSameSupertype = ContainerUtil.filter(myItems, item -> item.mySuperType == subItem.mySuperType);
    long selected = withSameSupertype.stream().filter(item -> item.isSelected()).count();
    if (selected == 0) return ThreeStateCheckBox.State.NOT_SELECTED;
    if (selected == withSameSupertype.size()) return ThreeStateCheckBox.State.SELECTED;
    return ThreeStateCheckBox.State.DONT_CARE;
  }
private ThreeStateCheckBox.State getSuperItemState(@NotNull MyFileTypeItem subItem)