BUG-7464: Cleanup CNode instantiation 74/49874/6
authorRobert Varga <rovarga@cisco.com>
Fri, 30 Dec 2016 13:36:36 +0000 (14:36 +0100)
committerRobert Varga <rovarga@cisco.com>
Mon, 9 Jan 2017 14:17:12 +0000 (15:17 +0100)
commita93f1fb12c8e56cfb6bfdca2400e764e7eba3e67
treebf87c2e2ff4b6faf7e2a7436c14ed06b6adb4b4f
parent13352e4f7d9d018b0e70df8ec2f86967b08496d3
BUG-7464: Cleanup CNode instantiation

Reorder arguments being passed in so we can use variadic
arguments for nodes. This allows us to make the code more
concise by leaving array allocation up to the compiler.

For root nodes reuse an empty array instance, hosted in
CNode instead of allocating a new one for each new TrieMap.

Change-Id: Ic0574917d5d38c62b94594d1bce27a731c90838c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
third-party/triemap/src/main/java/org/opendaylight/yangtools/triemap/CNode.java
third-party/triemap/src/main/java/org/opendaylight/yangtools/triemap/TrieMap.java