3 Temmuz 2019 Çarşamba

ImmutableBiMap Sınıfı

Giriş
ImmutableBiMap elemanların ekleme sırasını koruyor. Açıklaması şöyle.
We don't currently have a sorted BiMap type because it's a little ambiguous how it would work: would the entries be sorted by the keys? By the values? Would the forward entries be sorted by the keys, and the inverse entries be sorted by the values?

Currently, the only real available alternative is ImmutableBiMap, which retains the ordering that you put the entries in -- so ImmutableBiMap.copyOf(Maps.newTreeMap(map)) would give you a BiMap sorted by the keys.


Hiç yorum yok:

Yorum Gönder