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 a way to create a Pair with an already created Optional<> #1228

Closed
ndolhii opened this issue Jan 23, 2020 · 2 comments
Closed

Add a way to create a Pair with an already created Optional<> #1228

ndolhii opened this issue Jan 23, 2020 · 2 comments
Assignees

Comments

@ndolhii
Copy link

ndolhii commented Jan 23, 2020

Spine allows having an Optional as the second argument of Pair but the only way to create it is call Pair.withNullable() which allows the second argument to be null, but there is no option to create a Pair if I have a message that is already wrapped in Optional.

I see the method signature like this:

public static  <M extends Message, O extends Optional<? extends Message>> Pair<M, O> withOptional(M a, O b)

The resulting API will be:

Optional<Message> optional = Optional.of(...);

Pair<Message, Optional<Message>> = Pair.withOptional(message, optional);
@serhii-lekariev serhii-lekariev self-assigned this May 20, 2020
@serhii-lekariev
Copy link
Contributor

Reassigned to @armiol.

@alexander-yevsyukov
Copy link
Contributor

Closed by #1296.

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

No branches or pull requests

4 participants