code: public static <T> Collector<T, ?, List<T>> maxAll(final Comparator<? super T> comparator, final int atMostSize, final boolean areAllLargestSame) {
          N.checkArgPositive(atMostSize, "atMostSize");
  
          if (areAllLargestSame) {
              final Function<Pair<Optional<T>, Integer>, List<T>> finisher = new Function<Pair<Optional<T>, Integer>, List<T>>() {
                  @Override
                  public List<T> apply(Pair<Optional<T>, Integer> t) {
                      int n = N.min(atMostSize, t.right.intValue());
                      return n == 0 ? new ArrayList<T>() : N.repeat(t.left.get(), n);
                  }
              };
  
              return maxAlll(comparator, countingInt(), finisher);
          } else {
              return maxAll(comparator, atMostSize);
          }
      }
docs: Use occurrences to save the count of largest objects if {@code areAllLargestSame = true}(e.g. {@code Number/String/...}) and return a list by repeat the largest object {@code n} times.
  
  @implSpec
  The default implementation is equivalent to, for this {@code map}:
  <pre>
  <code>
  if (areAllLargestSame) {
  final Function<Pair<Optional<T>, Integer>, List<T>> finisher = new Function<Pair<Optional<T>, Integer>, List<T>>() {
  @Override
  public List<T> apply(Pair<Optional<T>, Integer> t) {
  int n = N.min(atMostSize, t.right.intValue());
  return n == 0 ? new ArrayList<T>() : N.repeat(t.left.get(), n);
  }
  };
  
  return maxAlll(comparator, countingInt(), finisher);
  } else {
  return maxAll(comparator, atMostSize);
  }
  </code>
  </pre>
  @param atMostSize
  @param areAllLargestSame
  @return