BiCollector

Brian Goetz brian.goetz at oracle.com
Tue Jun 19 12:39:59 UTC 2018


> We already have some toXxx() methods (toList, toSet, toCollection, 
> toMap, ...), so toBoth seems to me as a natural extension of that 
> naming principle:

For toXxx methods, the Xxx is terminal, and tied to the result type.  
toArray converts to an array; toList to a List; toCollection to a 
Collection.  This does not convert the elements to a Both, and there's 
no Both type.  So, I think the analogy falls apart.




More information about the core-libs-dev mailing list