/*
- * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
public class TestingNormalizedNodeStructuresCreator {
+ @SafeVarargs
static NormalizedNode<?, ?> cont1Node(
- DataContainerChild<? extends YangInstanceIdentifier.PathArgument, ?>... children) {
+ final DataContainerChild<? extends PathArgument, ?>... children) {
DataContainerNodeAttrBuilder<NodeIdentifier, ContainerNode> cont1 = Builders.containerBuilder();
cont1.withNodeIdentifier(new NodeIdentifier(QName.create("ns:complex:json", "2014-08-11", "cont1")));
DataContainerNodeBuilder<NodeIdentifier, ChoiceNode> choc12Builder = Builders.choiceBuilder()
.withNodeIdentifier(new NodeIdentifier(QName.create("ns:complex:json", "2014-08-11", "choc12")));
-// DataContainerNodeBuilder<AugmentationIdentifier, AugmentationNode> choc12Augmentation = Builders
-// .augmentationBuilder();
-// choc12Augmentation.withNodeIdentifier(new AugmentationIdentifier(Sets.newHashSet(QName.create(
-// "ns:complex:json", "2014-08-11", "c12B"))));
-// choc12Augmentation.withChild(lf17Node());
-
choc12Builder.withChild(lf17Node());
return choc12Builder.build();
}
.withValue("lf15_11 value from augmentation").build();
}
+ @SafeVarargs
private static DataContainerChild<? extends PathArgument, ?> choc11Node(
- DataContainerChild<? extends PathArgument, ?>... children) {
+ final DataContainerChild<? extends PathArgument, ?>... children) {
DataContainerNodeBuilder<NodeIdentifier, ChoiceNode> choc11Builder = Builders.choiceBuilder()
.withNodeIdentifier(new NodeIdentifier(QName.create("ns:complex:json", "2014-08-11", "choc11")));
choc11Builder.withValue(Lists.newArrayList(children));
return YangInstanceIdentifier.create(
new NodeIdentifier(QName.create("ns:complex:json", "2014-08-11", "cont1")),
new NodeIdentifier(QName.create("ns:complex:json", "2014-08-11", "lflst11")),
- new NodeWithValue(QName.create("ns:complex:json", "2014-08-11", "lflst11"),"foo")
+ new NodeWithValue<>(QName.create("ns:complex:json", "2014-08-11", "lflst11"),"foo")
);
}
lflst11.withChild(Builders
.leafSetEntryBuilder()
.withNodeIdentifier(
- new NodeWithValue(QName.create("ns:complex:json", "2014-08-11", "lflst11"), "lflst11 value1"))
+ new NodeWithValue<>(QName.create("ns:complex:json", "2014-08-11", "lflst11"), "lflst11 value1"))
.withValue("lflst11 value1").build());
lflst11.withChild(Builders
.leafSetEntryBuilder()
.withNodeIdentifier(
- new NodeWithValue(QName.create("ns:complex:json", "2014-08-11", "lflst11"), "lflst11 value2"))
+ new NodeWithValue<>(QName.create("ns:complex:json", "2014-08-11", "lflst11"), "lflst11 value2"))
.withValue("lflst11 value2").build());
return lflst11.build();
}
lflst11.withChild(Builders
.leafSetEntryBuilder()
.withNodeIdentifier(
- new NodeWithValue(QName.create("ns:complex:json", "2014-08-11", "lflst11"), "lflst11 value1\nanother line 1"))
+ new NodeWithValue<>(QName.create("ns:complex:json", "2014-08-11", "lflst11"), "lflst11 value1\nanother line 1"))
.withValue("lflst11 value1\nanother line 1").build());
lflst11.withChild(Builders
.leafSetEntryBuilder()
.withNodeIdentifier(
- new NodeWithValue(QName.create("ns:complex:json", "2014-08-11", "lflst11"), "lflst11 value2\r\nanother line 2"))
+ new NodeWithValue<>(QName.create("ns:complex:json", "2014-08-11", "lflst11"), "lflst11 value2\r\nanother line 2"))
.withValue("lflst11 value2\r\nanother line 2").build());
return lflst11.build();
}
* @return
*/
public static NormalizedNode<?, ?> caseNodeAugmentationInChoiceInContainer() {
- return cont1Node(choc11Node(lf13Node(), lf15_11Node(), lf15_12Node(), lf15_21Node()));
+ return cont1Node(choc11Node(augmentC11AWithLf15_11AndLf15_12Node(), lf13Node(), augmentC11AWithLf15_21Node()));
}
public static NormalizedNode<?, ?> caseNodeExternalAugmentationInChoiceInContainer() {
- return cont1Node(choc11Node(lf13Node(), lf15_11Node(), lf15_12Node(), lf15_11NodeExternal(), lf15_12NodeExternal()));
+ return cont1Node(choc11Node(lf13Node(), augmentC11AWithLf15_11AndLf15_12Node(), externalAugmentC11AWithLf15_11AndLf15_12Node()));
}
public static NormalizedNode<?, ?> choiceNodeAugmentationInContainer() {