Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add converters from Pair and Triple to List types. #1103

Merged
merged 1 commit into from
Jun 6, 2021

Conversation

donraab
Copy link
Contributor

@donraab donraab commented Jun 2, 2021

Signed-off-by: Donald Raab Donald.Raab@bnymellon.com

@mohrezaei
Copy link
Member

Philosophical question: shouldn't Twin and Triplet implement unmodifiable list? That would largely obviate this change.

@donraab
Copy link
Contributor Author

donraab commented Jun 3, 2021

It's a great question @mohrezaei, and Twin and Triplet certainly could implement List or ImmutableList. Unfortunately that would be a heavier lift than the static converter methods, and wouldn't work with Pair or Triple, which is what I was looking for in this particular case. I had some code that used zip which returns a Pair, and I needed to convert it to a List. The types happen to be the same, but unfortunately there isn't a zip that returns Twin. Not sure that would be worth adding.

Signed-off-by: Donald Raab <Donald.Raab@bnymellon.com>
@prathasirisha prathasirisha merged commit 8948b46 into eclipse:master Jun 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants