Skip to content

J2CL: expose ImmutableMap.ofEntries to JS#8281

Merged
copybara-service[bot] merged 1 commit intomasterfrom
test_883670695
Mar 17, 2026
Merged

J2CL: expose ImmutableMap.ofEntries to JS#8281
copybara-service[bot] merged 1 commit intomasterfrom
test_883670695

Conversation

@copybara-service
Copy link
Copy Markdown
Contributor

J2CL: expose ImmutableMap.ofEntries to JS

Callers from JS can use java.util.Map.entry(key, value) to create Entry
instances to pass to this. For example:

const m = new Map([["key1", "value1"], ["key2", "value2"]]);
const immutableMap = ImmutableMap.ofEntries(
    ...m.entries().map(([k, v]) => java.util.Map.entry(k, v))
);

RELNOTES=n/a

Callers from JS can use `java.util.Map.entry(key, value)` to create `Entry`
instances to pass to this. For example:

```js
const m = new Map([["key1", "value1"], ["key2", "value2"]]);
const immutableMap = ImmutableMap.ofEntries(
    ...m.entries().map(([k, v]) => java.util.Map.entry(k, v))
);
```

RELNOTES=n/a
PiperOrigin-RevId: 885046186
@copybara-service copybara-service bot merged commit 638ab18 into master Mar 17, 2026
@copybara-service copybara-service bot deleted the test_883670695 branch March 17, 2026 15:51
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.

1 participant