public class StreamUtils
extends java.lang.Object
| Constructor and Description | 
|---|
StreamUtils()  | 
| Modifier and Type | Method and Description | 
|---|---|
static <T,A,D> java.util.stream.Collector<T,?,D> | 
maxAll(java.util.Comparator<? super T> comparator,
      java.util.stream.Collector<? super T,A,D> downstream)
A collector that returns all results that are the maximum based on the provided comparator. 
 | 
static <T,A,D> java.util.stream.Collector<T,?,D> | 
minAll(java.util.Comparator<? super T> comparator,
      java.util.stream.Collector<? super T,A,D> downstream)
A collector that returns all results that are the minimum based on the
 provided comparator. 
 | 
static <T> java.util.stream.Collector<T,java.util.Collection<T>,java.util.Collection<T>> | 
toImmutableCollection()  | 
static <T,A extends java.util.Collection<T>> | 
toImmutableCollection(java.util.function.Supplier<A> collectionFactory)  | 
public static <T,A,D> java.util.stream.Collector<T,?,D> maxAll(java.util.Comparator<? super T> comparator,
                                                               java.util.stream.Collector<? super T,A,D> downstream)
T - The type of objects being streamedA - The mutable accumulation type of the reduction operationD - The result type of the reduction operationcomparator - The comparator to order the items in the streamdownstream - Which collector to use to combine the resultspublic static <T,A,D> java.util.stream.Collector<T,?,D> minAll(java.util.Comparator<? super T> comparator,
                                                               java.util.stream.Collector<? super T,A,D> downstream)
T - The type of objects being streamedA - The mutable accumulation type of the reduction operationD - The result type of the reduction operationcomparator - The comparator to order the items in the streamdownstream - Which collector to use to combine the resultspublic static <T,A extends java.util.Collection<T>> java.util.stream.Collector<T,A,java.util.Collection<T>> toImmutableCollection(java.util.function.Supplier<A> collectionFactory)
T - The type of the input elementsA - The accumulation typecollectionFactory - The collection factorypublic static <T> java.util.stream.Collector<T,java.util.Collection<T>,java.util.Collection<T>> toImmutableCollection()
T - The type