- final Map<QName, DataSchemaNode> m = new HashMap<>(realChildSchemas.size());
- for (DataSchemaNode realChildSchema : realChildSchemas) {
- m.put(realChildSchema.getQName(), realChildSchema);
- }
-
- mappedChildSchemas = ImmutableMap.copyOf(m);
- }
-
- /**
- * Returns an AugmentationSchemaNode as effective in a parent node.
- *
- * @param schema Augmentation schema
- * @param parent Parent schema
- * @return Adjusted Augmentation schema
- * @throws NullPointerException if any of the arguments is null
- */
- // FIXME: 8.0.0: integrate this method into the constructor
- public static AugmentationSchemaNode create(final AugmentationSchemaNode schema, final DataNodeContainer parent) {
- final Set<DataSchemaNode> children = new HashSet<>();
- for (DataSchemaNode augNode : schema.getChildNodes()) {
+ final var augmentChildren = augment.getChildNodes();
+ final var builder = ImmutableMap.<QName, DataSchemaNode>builderWithExpectedSize(augmentChildren.size());
+ for (var augChild : augmentChildren) {