
com.annimon.stream.Collector Maven / Gradle / Ivy
The newest version!
package com.annimon.stream;
import com.annimon.stream.function.BiConsumer;
import com.annimon.stream.function.Function;
import com.annimon.stream.function.Supplier;
/**
* The Collector of stream data.
*
* @param the type of input elements to the reduction operation
* @param the mutable accumulation type of the reduction operation
* @param the result type of the reduction operation
* @see Stream#collect(com.annimon.stream.Collector)
*/
public interface Collector {
/**
* Function provides new containers.
*
* @return {@code Supplier}
*/
Supplier supplier();
/**
* Function folds elements into container.
*
* @return {@code BiConsumer}
*/
BiConsumer accumulator();
/**
* Function produces result by transforming intermediate type.
*
* @return {@code Function}
*/
Function finisher();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy