public static <T> Collector<T, ?, List<T>> maxAll(Comparator<? super T> comparator) {
        return maxAll(comparator, Collectors.toList());
    }
public static < T > Collector < T , ? , List < T > > maxAll ( Comparator < ? super T > comparator ) { return maxAll ( comparator , Collectors . toList ( ) ) ; }
Returns a {@code Collector} which finds all the elements which are equal
to each other and bigger than any other element according to the
specified {@link Comparator}. The found elements are collected to
{@link List}.

@param <T> the type of the input elements
@param comparator a {@code Comparator} to compare the elements
@return a {@code Collector} which finds all the maximal elements and
collects them to the {@code List}.
@see #maxAll(Comparator, Collector)
@see #maxAll()