Allocate new keyes map lazily 22/78322/2
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 29 Nov 2018 14:25:35 +0000 (15:25 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Sat, 1 Dec 2018 08:04:01 +0000 (09:04 +0100)
commitf53379c22ceae799c634959a82aaddc1c474ae72
tree0d26589a7922cd5944db3dcd0111330eec38a783
parentce89ec312701513f9cc07f4f5c93fe21d536f24a
Allocate new keyes map lazily

Do not allocate the map for new mappings until it is actually needed.
This introduces some additional complexity via null checks, but that
is not something major.

Also refactor large equals() method into smaller chunks, so that it
can be inlined more easily.

JIRA: YANGTOOLS-919
Change-Id: Idb4b7a4cb7cde09af2eab0bcebfb71083e64ff2f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 62876a059465a1c780eb88e9ef5f285f4a052ec2)
common/util/src/main/java/org/opendaylight/yangtools/util/MutableOffsetMap.java