Allocate new keyes map lazily 96/78296/2
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 29 Nov 2018 14:25:35 +0000 (15:25 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 29 Nov 2018 15:53:32 +0000 (16:53 +0100)
commit62876a059465a1c780eb88e9ef5f285f4a052ec2
tree9beefbf890f8d12590a45ef1c1ea94d3c86627df
parent5c47087c7c0c5cab21d915e9d174f536ead746ae
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>
common/util/src/main/java/org/opendaylight/yangtools/util/MutableOffsetMap.java