BUG-4158: Introduce Modifiable/UnmodifiableMapPhase 32/26032/2
authorRobert Varga <rovarga@cisco.com>
Tue, 25 Aug 2015 08:18:13 +0000 (10:18 +0200)
committerGerrit Code Review <gerrit@opendaylight.org>
Thu, 27 Aug 2015 14:16:47 +0000 (14:16 +0000)
commit9c1b0747a9441c7fb0c5d601d98b3a4ecd859c12
treea9ae27ba74c6f3f6175e1bb46116438aa40404ac
parentb0b8d9ef5d43eb850a92203345a3e72c6eeaf043
BUG-4158: Introduce Modifiable/UnmodifiableMapPhase

Our code frequently uses an access pattern, where we create a modifiable
map, then turn it into an unmodifiable one and then we want to create a
modifiable map containing all the mappings in the unmodifiable one (and
then turn it again into unodifiable).

This patch introduces interfaces which mark the modifiable/unmodifiable
phases of such mapping. They also define the interface contract
implementation must follow to be usable with this usabe pattern.

Change-Id: I08b3077739a3df89e57c54a6937744f2394701bc
Signed-off-by: Robert Varga <rovarga@cisco.com>
common/util/src/main/java/org/opendaylight/yangtools/util/ModifiableMapPhase.java [new file with mode: 0644]
common/util/src/main/java/org/opendaylight/yangtools/util/UnmodifiableMapPhase.java [new file with mode: 0644]
yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/schema/builder/impl/AbstractImmutableDataContainerNodeBuilder.java