CustomMembersHolder (@NotNull List<CustomMembersHolder> holders) { List<CustomMembersHolder> nonEmptyHolders = ContainerUtil.filter(holders, it -> it != EMPTY); if (nonEmptyHolders.isEmpty()) { return EMPTY; } else if (nonEmptyHolders.size() == 1) { return nonEmptyHolders.get(0); } else { return new CompoundMembersHolder(nonEmptyHolders); } }