Convert getStreamFlags() -> EnumSet
Paul Sandoz
paul.sandoz at oracle.com
Tue Nov 20 00:51:01 PST 2012
On Nov 20, 2012, at 12:34 AM, Brian Goetz <brian.goetz at Oracle.COM> wrote:
> Given that stream flags are largely an internal implementation
> mechanism, our current preference is for leaving these things in the
> integer domain. (Note that we use two bits per flag, to track operation
> characteristics such as injects-X, preserves-X, clears-X).
>
Right, it's more efficient to do all the bit operations for producing bit masks and combining.
> But a method in StreamOpFlags that takes an int and returns an EnumSet
> is harmless as long as we don't force its use. A reasonable thing to
> consider when we expose the Ops APIs.
>
It's probably useful for debugging/tests even if it is not used really used for other purposes as it makes me go cross eyed looking at the binary values. When i have a spare moment i will add something.
Paul.
> On 11/19/2012 6:12 PM, Paul Benedict wrote:
>> Brian, I was wondering if there is value in exposing the stream flags also
>> as an EnumSet. What do you think? Or at least a conversion method that can
>> take the int and generate the EnumSet
>>
>> Paul
>>
>
More information about the lambda-dev
mailing list