[ 
https://issues.apache.org/jira/browse/QUARKS-16?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15187492#comment-15187492
 ] 

Daniel John Debrunner commented on QUARKS-16:
---------------------------------------------

The code also makes me think that a enum based split would be useful.

Something like:

<E> List<TStream<T>> split(Class<E> enumClass, Function<T,E> splitter)

So the stream is split by the enum value with the returned streams in ordinal 
order.

This may have the benefit of being slef-maintaining, so that if an enum value 
is added, the returned number of streams changes automatically, but only if 
given an enum class one can figure out the number of enums.

I'll enter a new issue.

> Recipe creation for split and union
> -----------------------------------
>
>                 Key: QUARKS-16
>                 URL: https://issues.apache.org/jira/browse/QUARKS-16
>             Project: Quarks
>          Issue Type: Improvement
>          Components: Documentation
>            Reporter: Queenie Ma
>            Priority: Minor
>              Labels: documentation, enhancement
>         Attachments: HeartMonitor.java, SplitUnion.java, split_union.md
>
>
> I wrote up a recipe on how to split and union streams. I'd like to get some 
> feedback on the sample code and the recipe walkthrough.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to