BUG-6522: streamline QNameToStatementDefinitionMap API 67/47567/5
authorRobert Varga <rovarga@cisco.com>
Tue, 25 Oct 2016 22:44:19 +0000 (00:44 +0200)
committerRobert Varga <nite@hq.sk>
Wed, 26 Oct 2016 14:32:50 +0000 (14:32 +0000)
commit012fb5b3fac35a0fec1380abbf19d07dcd5e0f28
tree983d618b92443232abc67ed50baca91d0e905395
parent47ab5589e16c7f0c965d50375dbc438b4f1d88f7
BUG-6522: streamline QNameToStatementDefinitionMap API

This really is a Map, but let's not as far as declaring
it as such.

Add putAll() and putIfAbsent(), which make life way easier
for SourceSpecificContext -- which is the sole user. The end
result is better performance at least in the bulk case,
as we end up populating one of the maps via addAll().

Also take time to formulate the class in terms of lambas,
as that takes a lot of verbosity out.

Change-Id: Ie4f70cbc01011eb49b330ea4411d8308c401f76d
Signed-off-by: Robert Varga <rovarga@cisco.com>
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/source/QNameToStatementDefinitionMap.java
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/SourceSpecificContext.java