Page MenuHomeDevCentral

Allow to map Vector elements into HashMap
ClosedPublic

Authored by dereckson on Jul 1 2023, 19:02.
Tags
None
Referenced Files
F3934483: D3217.id8243.diff
Mon, Dec 23, 05:31
F3934480: D3217.id8244.diff
Mon, Dec 23, 05:31
Unknown Object (File)
Sun, Dec 22, 05:12
Unknown Object (File)
Tue, Dec 17, 23:54
Unknown Object (File)
Tue, Dec 17, 23:54
Unknown Object (File)
Tue, Dec 17, 05:13
Unknown Object (File)
Tue, Dec 17, 05:12
Unknown Object (File)
Tue, Dec 17, 03:35
Subscribers
None

Details

Summary

Callback must return an array of exactly two elements:
[key, value]

It can takes in parameter ($value) or ($key, $value).

This array is used to build a HashMap with at most the
same number of elements than the vector.

If several identical keys are returned by the different
callback executions, the last value is kept.

This is the reverse operation from D3214.

Test Plan

Unit tests are provided.

Diff Detail

Repository
rKERUALD Keruald libraries development repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

dereckson created this revision.
This revision is now accepted and ready to land.Jul 1 2023, 19:06
This revision was landed with ongoing or failed builds.Jul 1 2023, 19:06
This revision was automatically updated to reflect the committed changes.