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