package org.opendaylight.yangtools.yang.data.impl.schema.builder.impl;
import com.google.common.base.Preconditions;
-import com.google.common.collect.Sets;
+import java.util.Collections;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier;
import org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode;
import org.opendaylight.yangtools.yang.data.api.schema.MapNode;
protected ImmutableMapNodeSchemaAwareBuilder(final ListSchemaNode schema) {
this.schema = Preconditions.checkNotNull(schema);
- super.withNodeIdentifier(new NodeIdentifier(schema.getQName()));
+ super.withNodeIdentifier(NodeIdentifier.create(schema.getQName()));
}
protected ImmutableMapNodeSchemaAwareBuilder(final ListSchemaNode schema, final ImmutableMapNode node) {
super(node);
this.schema = Preconditions.checkNotNull(schema);
- super.withNodeIdentifier(new NodeIdentifier(schema.getQName()));
+ super.withNodeIdentifier(NodeIdentifier.create(schema.getQName()));
}
public static CollectionNodeBuilder<MapEntryNode, MapNode> create(final ListSchemaNode schema) {
@Override
public CollectionNodeBuilder<MapEntryNode, MapNode> withChild(final MapEntryNode child) {
- DataValidationException.checkLegalChild(schema.getQName().equals(child.getNodeType()), child.getIdentifier(), schema, Sets.newHashSet(schema.getQName()));
+ DataValidationException.checkLegalChild(schema.getQName().equals(child.getNodeType()), child.getIdentifier(),
+ schema, Collections.singleton(schema.getQName()));
return super.withChild(child);
}
@Override
- public CollectionNodeBuilder<MapEntryNode, MapNode> withNodeIdentifier(final NodeIdentifier nodeIdentifier) {
+ public CollectionNodeBuilder<MapEntryNode, MapNode> withNodeIdentifier(final NodeIdentifier withNodeIdentifier) {
throw new UnsupportedOperationException("Node identifier created from schema");
}
}