When to fill the value -> key direction of a BiMap.
lazy
eager
Both answer BiMap#getKey|getKey and BiMap#hasValue|hasValue the same, they differ only in when the work happens.
When to fill the value -> key direction of a BiMap.
lazy(default) fills it on the first reverse lookup and maintains it from then on, so a map nobody asks in reverse never pays a write per entry.eagerfills it from the start, for a map written once and then asked in reverse from a hot path.Both answer BiMap#getKey|getKey and BiMap#hasValue|hasValue the same, they differ only in when the work happens.