
com.annimon.stream.Collector Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of stream Show documentation
Show all versions of stream Show documentation
Stream API from Java 8 rewrited on iterators for Java 7 and below.
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 Supplier}
*/
BiConsumer accumulator();
/**
* Function produces result by transforming intermediate type.
*
* @return {@code Function}
*/
Function finisher();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy