Skip to content

Conversation

@rhuffy
Copy link
Contributor

@rhuffy rhuffy commented Feb 8, 2025

Follows #183 and 78c0490, which introduced

StreamEx.mapPartial, EntryStream.mapToKeyPartial/mapToValuePartial/mapKeyValuePartial

This PR implements EntryStream.mapToEntryPartial, which takes a partial value mapper Function<K, Optional<V>> and returns an EntryStream<K, V> with the empty optionals removed.

The intention is to replace

StreamEx.of(x).mapToEntry(partialFunction).flatMapValues(Optional::stream);

with

StreamEx.of(x).mapToEntryPartial(partialFunction);

@rhuffy
Copy link
Contributor Author

rhuffy commented Feb 25, 2025

Hey @amaembo, could I get a review here when you have the chance?

@amaembo amaembo added this to the 0.8.4 milestone Mar 27, 2025
@amaembo amaembo merged commit 072bf1c into amaembo:master Mar 27, 2025
@amaembo
Copy link
Owner

amaembo commented Mar 27, 2025

Thanks for your contribution

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.

2 participants