src/share/classes/java/util/stream/Stream.java
Print this page
rev 7594 : 8015315: Stream.concat methods
Contributed-by: brian.goetz@oracle.com, henry.jen@oracle.com
rev 7597 : 8015318: Extend Collector with 'finish' operation
Reviewed-by:
Contributed-by: brian.goetz@oracle.com
*** 649,664 ****
* = personStream.collect(Collectors.groupBy(Person::getState,
* Collectors.groupBy(Person::getCity)));
* }</pre>
*
* @param <R> the type of the result
* @param collector the {@code Collector} describing the reduction
* @return the result of the reduction
* @see #collect(Supplier, BiConsumer, BiConsumer)
* @see Collectors
*/
! <R> R collect(Collector<? super T, R> collector);
/**
* Returns the minimum element of this stream according to the provided
* {@code Comparator}. This is a special case of a
* <a href="package-summary.html#MutableReduction">reduction</a>.
--- 649,665 ----
* = personStream.collect(Collectors.groupBy(Person::getState,
* Collectors.groupBy(Person::getCity)));
* }</pre>
*
* @param <R> the type of the result
+ * @param <A> the intermediate accumulation type of the {@code Collector}
* @param collector the {@code Collector} describing the reduction
* @return the result of the reduction
* @see #collect(Supplier, BiConsumer, BiConsumer)
* @see Collectors
*/
! <R, A> R collect(Collector<? super T, A, R> collector);
/**
* Returns the minimum element of this stream according to the provided
* {@code Comparator}. This is a special case of a
* <a href="package-summary.html#MutableReduction">reduction</a>.