package org.opendaylight.yangtools.yang.data.impl.schema.builder.impl;
import java.util.Map;
+import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
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;
super(node);
}
- public static DataContainerNodeBuilder<NodeIdentifier, ChoiceNode> create() {
+ public static @NonNull DataContainerNodeBuilder<NodeIdentifier, ChoiceNode> create() {
return new ImmutableChoiceNodeBuilder();
}
- public static DataContainerNodeBuilder<NodeIdentifier, ChoiceNode> create(final int sizeHint) {
+ public static @NonNull DataContainerNodeBuilder<NodeIdentifier, ChoiceNode> create(final int sizeHint) {
return new ImmutableChoiceNodeBuilder(sizeHint);
}
- public static DataContainerNodeBuilder<NodeIdentifier, ChoiceNode> create(final ChoiceNode node) {
+ public static @NonNull DataContainerNodeBuilder<NodeIdentifier, ChoiceNode> create(final ChoiceNode node) {
if (!(node instanceof ImmutableChoiceNode)) {
throw new UnsupportedOperationException(String.format("Cannot initialize from class %s", node.getClass()));
}
private static final class ImmutableChoiceNode extends AbstractImmutableDataContainerNode<NodeIdentifier>
implements ChoiceNode {
- ImmutableChoiceNode(final NodeIdentifier nodeIdentifier,
- final Map<PathArgument, DataContainerChild<? extends PathArgument, ?>> children) {
+ ImmutableChoiceNode(final NodeIdentifier nodeIdentifier, final Map<PathArgument, Object> children) {
super(children, nodeIdentifier);
}
}