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

ASF GitHub Bot commented on FLINK-3075:
---------------------------------------

Github user vasia commented on the pull request:

    https://github.com/apache/flink/pull/1402#issuecomment-159566437
  
    I still think there's no reason for `Left` and `Right` to be public 
classes, especially if you keep the static creation methods. But, if this is 
just me, go ahead :)


> Rename Either creation methods to avoid name clash with projection methods
> --------------------------------------------------------------------------
>
>                 Key: FLINK-3075
>                 URL: https://issues.apache.org/jira/browse/FLINK-3075
>             Project: Flink
>          Issue Type: Improvement
>          Components: Java API
>            Reporter: Gyula Fora
>            Assignee: Gyula Fora
>            Priority: Minor
>
> Currently the method signatures for creating Either values 
> `Either.left(left)` and the projection methods `either.left()` only differ in 
> the parameters. 
> This makes it awkward to use with lambdas such as: 
> 'eitherStream.filter(Either:isLeft).map(Either::left)'
> The above code is currently impossible.
> I suggest to change the creation methods to `Either.createLeft(left)` and 
> `Either.createRight(right)` and also to directly expose the Left, Right 
> classes.



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

Reply via email to