[YANGTOOLS-917] Allow OffsetMaps to be efficiently instantiated Created: 13/Nov/18  Updated: 10/Apr/22  Resolved: 25/Nov/18

Status: Resolved
Project: yangtools
Component/s: None
Affects Version/s: None
Fix Version/s: 2.0.13, 2.1.4

Type: New Feature Priority: Medium
Reporter: Robert Varga Assignee: Robert Varga
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to MDSAL-387 Excessive HashMap.resize() from Ident... Resolved

 Description   

It would be nice if we could directly instantiate OffsetMaps. While we currently provide copyOf() operations, it would be nice if the users could, use a scratch space builder, where they pre-assign offsets.

This is useful for situations where the keySet is known and we are performing a transformation - hence a transformedFrom() would be sufficient, but perhaps we can provide an efficient way of caching the key->offset map, too, so that that lookup/cache is not needed.


Generated at Wed Feb 07 20:54:40 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.