Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-3075

Rename Either creation methods to avoid name clash with projection methods

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • None
    • None
    • None

    Description

      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.

      Attachments

        Activity

          People

            gyfora Gyula Fora
            gyfora Gyula Fora
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: