Convert getStreamFlags() -> EnumSet

Brian Goetz brian.goetz at oracle.com
Mon Nov 19 15:34:48 PST 2012


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).

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.

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