*/
package org.opendaylight.yangtools.yang.data.impl.schema.builder.impl;
-import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
+import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
import org.opendaylight.yangtools.yang.data.api.schema.LeafNode;
-import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.NormalizedNodeBuilder;
+import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.NormalizedNodeAttrBuilder;
import org.opendaylight.yangtools.yang.model.api.LeafSchemaNode;
public final class ImmutableLeafNodeSchemaAwareBuilder<T> extends ImmutableLeafNodeBuilder<T> {
- private final LeafSchemaNode schema;
-
private ImmutableLeafNodeSchemaAwareBuilder(LeafSchemaNode schema) {
- super();
- this.schema = schema;
- super.withNodeIdentifier(new InstanceIdentifier.NodeIdentifier(schema.getQName()));
+ super.withNodeIdentifier(new YangInstanceIdentifier.NodeIdentifier(schema.getQName()));
}
- public static <T> NormalizedNodeBuilder<InstanceIdentifier.NodeIdentifier, T, LeafNode<T>> create(LeafSchemaNode schema) {
+ public static <T> NormalizedNodeAttrBuilder<YangInstanceIdentifier.NodeIdentifier, T, LeafNode<T>> create(LeafSchemaNode schema) {
return new ImmutableLeafNodeSchemaAwareBuilder<>(schema);
}
@Override
- public NormalizedNodeBuilder<InstanceIdentifier.NodeIdentifier, T, LeafNode<T>> withValue(T value) {
+ public NormalizedNodeAttrBuilder<YangInstanceIdentifier.NodeIdentifier, T, LeafNode<T>> withValue(T value) {
// TODO check value type
return super.withValue(value);
}
@Override
- public NormalizedNodeBuilder<InstanceIdentifier.NodeIdentifier, T, LeafNode<T>> withNodeIdentifier(InstanceIdentifier.NodeIdentifier nodeIdentifier) {
+ public NormalizedNodeAttrBuilder<YangInstanceIdentifier.NodeIdentifier, T, LeafNode<T>> withNodeIdentifier(YangInstanceIdentifier.NodeIdentifier nodeIdentifier) {
throw new UnsupportedOperationException("Node identifier created from schema");
}
}