#81 ArrayMap should impement SortedMap

Open
opened 4 years ago by ranides · 1 comments
ranides commented 4 years ago

In fact it should be trivial as long as we review correct work for subrange of source array (at this moment we work with whole arrays).

In fact it should be trivial as long as we review correct work for subrange of source array (at this moment we work with whole arrays).
ranides commented 1 year ago
Owner

Not really. This map is mutable. We can't just use "array subrange" because insertion and removal reallocates everything. submaps must store only keys and locate boundaries all the time.

What's more, some methods are really burdensome. Official contract does not require returning SortedSet in entrySet or keySet, but in reality we expect that in our unit tests.

Not really. This map is mutable. We can't just use "array subrange" because insertion and removal reallocates everything. submaps must store only **keys** and locate boundaries all the time. What's more, some methods are really burdensome. Official contract does not require returning SortedSet in `entrySet` or `keySet`, but in reality we expect that in our unit tests.
Sign in to join this conversation.
No Milestone
No assignee
1 Participants
Loading...
Cancel
Save
There is no content yet.