@PSOperatorWrapper public class Collectors extends java.lang.Object
| Constructor and Description |
|---|
Collectors() |
| Modifier and Type | Method and Description |
|---|---|
static <Tout> PStreamAction |
collectItems(Function<java.util.List<Item>,Tout> itemsCollector,
Callback<Tout> resultHandler)
Collect the items in the stream with a collector function, and handle the result with another function.
|
static PStreamAction |
collectItems(Function<java.util.List<Item>,java.lang.Void> itemsCollector)
Collect the items in the stream with a collector function.
|
static Function<PStream,java.util.List<Item>> |
toItemList()
Collect the PStream to a list of Items.
|
public static <Tout> PStreamAction collectItems(Function<java.util.List<Item>,Tout> itemsCollector, Callback<Tout> resultHandler)
Tout - the output type of collectoritemsCollector - the function to collect the itemsresultHandler - the function to handle resultpublic static PStreamAction collectItems(Function<java.util.List<Item>,java.lang.Void> itemsCollector)
itemsCollector - the function to collect the items