import java.util.Map;
-import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
+import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
import org.opendaylight.yangtools.yang.data.api.schema.ChoiceNode;
import org.opendaylight.yangtools.yang.data.api.schema.DataContainerChild;
import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.DataContainerNodeBuilder;
import org.opendaylight.yangtools.yang.data.impl.schema.nodes.AbstractImmutableDataContainerNode;
-public class ImmutableChoiceNodeBuilder extends AbstractImmutableDataContainerNodeBuilder<InstanceIdentifier.NodeIdentifier, ChoiceNode> {
+public class ImmutableChoiceNodeBuilder extends AbstractImmutableDataContainerNodeBuilder<YangInstanceIdentifier.NodeIdentifier, ChoiceNode> {
protected ImmutableChoiceNodeBuilder() {
super();
}
+ protected ImmutableChoiceNodeBuilder(final int sizeHint) {
+ super(sizeHint);
+ }
+
protected ImmutableChoiceNodeBuilder(final ImmutableChoiceNode node) {
super(node);
}
- public static DataContainerNodeBuilder<InstanceIdentifier.NodeIdentifier, ChoiceNode> create() {
+ public static DataContainerNodeBuilder<YangInstanceIdentifier.NodeIdentifier, ChoiceNode> create() {
return new ImmutableChoiceNodeBuilder();
}
- public static DataContainerNodeBuilder<InstanceIdentifier.NodeIdentifier, ChoiceNode> create(final ChoiceNode node) {
+ public static DataContainerNodeBuilder<YangInstanceIdentifier.NodeIdentifier, ChoiceNode> create(final int sizeHint) {
+ return new ImmutableChoiceNodeBuilder(sizeHint);
+ }
+
+ public static DataContainerNodeBuilder<YangInstanceIdentifier.NodeIdentifier, ChoiceNode> create(final ChoiceNode node) {
if (!(node instanceof ImmutableChoiceNode)) {
throw new UnsupportedOperationException(String.format("Cannot initialize from class %s", node.getClass()));
}
return new ImmutableChoiceNode(getNodeIdentifier(), buildValue());
}
- private static final class ImmutableChoiceNode
- extends AbstractImmutableDataContainerNode<InstanceIdentifier.NodeIdentifier>
- implements ChoiceNode {
+ private static final class ImmutableChoiceNode extends AbstractImmutableDataContainerNode<YangInstanceIdentifier.NodeIdentifier> implements ChoiceNode {
- ImmutableChoiceNode(final InstanceIdentifier.NodeIdentifier nodeIdentifier,
- final Map<InstanceIdentifier.PathArgument, DataContainerChild<? extends InstanceIdentifier.PathArgument, ?>> children) {
+ ImmutableChoiceNode(final YangInstanceIdentifier.NodeIdentifier nodeIdentifier,
+ final Map<YangInstanceIdentifier.PathArgument, DataContainerChild<? extends YangInstanceIdentifier.PathArgument, ?>> children) {
super(children, nodeIdentifier);
}
}