#81 ArrayMap should impement SortedMap

Ouvert
Créé il y a 4 ans par ranides · 1 commentaires
ranides a commenté il y a 4 ans

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 a commenté il y a 1 an
Propriétaire

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.
Connectez-vous pour rejoindre cette conversation.
Aucun jalon
Pas d'assignataire
1 Participants
Chargement…
Annuler
Enregistrer
Il n'existe pas encore de contenu.