- final ModulesStateBuilder builder = new ModulesStateBuilder().setModuleSetId("")
- .setModule(context.getModules().stream()
- .map(module -> new ModuleBuilder()
- .setName(new YangIdentifier(module.getName()))
- .setNamespace(new Uri(module.getNamespace().toString()))
- .setRevision(convertRevision(module.getRevision()))
- .setSubmodule(module.getSubmodules().stream()
- .map(submodule -> new SubmoduleBuilder()
- .setName(new YangIdentifier(submodule.getName()))
- .setRevision(convertRevision(submodule.getRevision()))
- .build())
- .collect(Collectors.toUnmodifiableMap(Submodule::key, Function.identity())))
- .setFeature(module.getFeatures().stream()
- .map(feat -> new YangIdentifier(feat.getQName().getLocalName()))
- .collect(Collectors.toUnmodifiableList()))
- .setConformanceType(Module.ConformanceType.Implement)
- .build())
- .collect(Collectors.toUnmodifiableMap(Module::key, Function.identity())));
+ final ModulesStateBuilder builder = new ModulesStateBuilder()
+ .setModuleSetId("")
+ .setModule(context.getModules().stream()
+ .map(module -> new ModuleBuilder()
+ .setName(new YangIdentifier(module.getName()))
+ .setNamespace(new Uri(module.getNamespace().toString()))
+ .setRevision(convertRevision(module.getRevision()))
+ .setSubmodule(module.getSubmodules().stream()
+ .map(submodule -> new SubmoduleBuilder()
+ .setName(new YangIdentifier(submodule.getName()))
+ .setRevision(convertRevision(submodule.getRevision()))
+ .build())
+ .collect(BindingMap.toMap()))
+ .setFeature(module.getFeatures().stream()
+ .map(feat -> new YangIdentifier(feat.getQName().getLocalName()))
+ .collect(Collectors.toUnmodifiableSet()))
+ .setConformanceType(Module.ConformanceType.Implement)
+ .build())
+ .collect(BindingMap.toMap()));