Cleanup checkstyle warnings and turn enforcement on in yang-data-impl
[yangtools.git] / yang / yang-data-impl / src / main / java / org / opendaylight / yangtools / yang / data / impl / schema / Builders.java
index da82eaac9c65034f15b7f7121da361c382d88abc..6b739eee0aaf4f7e725e9fe78254deef85aab45c 100644 (file)
@@ -24,6 +24,7 @@ import org.opendaylight.yangtools.yang.data.api.schema.MapNode;
 import org.opendaylight.yangtools.yang.data.api.schema.OrderedMapNode;
 import org.opendaylight.yangtools.yang.data.api.schema.UnkeyedListEntryNode;
 import org.opendaylight.yangtools.yang.data.api.schema.UnkeyedListNode;
+import org.opendaylight.yangtools.yang.data.api.schema.YangModeledAnyXmlNode;
 import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.CollectionNodeBuilder;
 import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.DataContainerNodeAttrBuilder;
 import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.DataContainerNodeBuilder;
@@ -53,6 +54,7 @@ import org.opendaylight.yangtools.yang.data.impl.schema.builder.impl.ImmutableOr
 import org.opendaylight.yangtools.yang.data.impl.schema.builder.impl.ImmutableOrderedMapNodeSchemaAwareBuilder;
 import org.opendaylight.yangtools.yang.data.impl.schema.builder.impl.ImmutableUnkeyedListEntryNodeBuilder;
 import org.opendaylight.yangtools.yang.data.impl.schema.builder.impl.ImmutableUnkeyedListNodeBuilder;
+import org.opendaylight.yangtools.yang.data.impl.schema.builder.impl.ImmutableYangModeledAnyXmlNodeBuilder;
 import org.opendaylight.yangtools.yang.model.api.AnyXmlSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.AugmentationSchema;
 import org.opendaylight.yangtools.yang.model.api.ChoiceSchemaNode;
@@ -60,6 +62,7 @@ import org.opendaylight.yangtools.yang.model.api.ContainerSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.LeafListSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.LeafSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.ListSchemaNode;
+import org.opendaylight.yangtools.yang.model.api.YangModeledAnyXmlSchemaNode;
 
 public final class Builders {
 
@@ -94,16 +97,21 @@ public final class Builders {
         return ImmutableAnyXmlNodeSchemaAwareBuilder.create(schema);
     }
 
-    public static <T> ListNodeBuilder<T,LeafSetEntryNode<T>> leafSetBuilder() {
-        return ImmutableLeafSetNodeBuilder.create();
+    public static <T> DataContainerNodeAttrBuilder<NodeIdentifier, YangModeledAnyXmlNode> yangModeledAnyXmlBuilder(
+            final YangModeledAnyXmlSchemaNode schema) {
+        return ImmutableYangModeledAnyXmlNodeBuilder.create(schema);
     }
 
-    public static <T> ListNodeBuilder<T,LeafSetEntryNode<T>>  orderedLeafSetBuilder() {
+    public static <T> ListNodeBuilder<T,LeafSetEntryNode<T>> orderedLeafSetBuilder() {
         return ImmutableOrderedLeafSetNodeBuilder.create();
     }
 
     public static <T> ListNodeBuilder<T,LeafSetEntryNode<T>> orderedLeafSetBuilder(final LeafListSchemaNode schema) {
-        return ImmutableOrderedLeafSetNodeSchemaAwareBuilder.<T>create(schema);
+        return ImmutableOrderedLeafSetNodeSchemaAwareBuilder.create(schema);
+    }
+
+    public static <T> ListNodeBuilder<T,LeafSetEntryNode<T>> leafSetBuilder() {
+        return ImmutableLeafSetNodeBuilder.create();
     }
 
     public static <T> ListNodeBuilder<T,LeafSetEntryNode<T>> leafSetBuilder(final LeafSetNode<T> node) {
@@ -111,18 +119,20 @@ public final class Builders {
     }
 
     public static <T> ListNodeBuilder<T,LeafSetEntryNode<T>> leafSetBuilder(final LeafListSchemaNode schema) {
-        return ImmutableLeafSetNodeSchemaAwareBuilder.<T>create(schema);
+        return ImmutableLeafSetNodeSchemaAwareBuilder.create(schema);
     }
 
-    public static <T> ListNodeBuilder<T,LeafSetEntryNode<T>> leafSetBuilder(final LeafListSchemaNode schema, final LeafSetNode<T> node) {
-        return ImmutableLeafSetNodeSchemaAwareBuilder.<T>create(schema, node);
+    public static <T> ListNodeBuilder<T,LeafSetEntryNode<T>> leafSetBuilder(final LeafListSchemaNode schema,
+            final LeafSetNode<T> node) {
+        return ImmutableLeafSetNodeSchemaAwareBuilder.create(schema, node);
     }
 
     public static DataContainerNodeAttrBuilder<NodeIdentifier, ContainerNode> containerBuilder() {
         return ImmutableContainerNodeBuilder.create();
     }
 
-    public static DataContainerNodeAttrBuilder<NodeIdentifier, ContainerNode> containerBuilder(final ContainerNode node) {
+    public static DataContainerNodeAttrBuilder<NodeIdentifier, ContainerNode> containerBuilder(
+            final ContainerNode node) {
         return ImmutableContainerNodeBuilder.create(node);
     }
 
@@ -145,10 +155,6 @@ public final class Builders {
         return ImmutableMapEntryNodeSchemaAwareBuilder.create(schema);
     }
 
-    public static CollectionNodeBuilder<MapEntryNode, MapNode> mapBuilder() {
-        return ImmutableMapNodeBuilder.create();
-    }
-
     public static CollectionNodeBuilder<MapEntryNode, OrderedMapNode> orderedMapBuilder() {
         return ImmutableOrderedMapNodeBuilder.create();
     }
@@ -161,6 +167,10 @@ public final class Builders {
         return ImmutableUnkeyedListNodeBuilder.create();
     }
 
+    public static CollectionNodeBuilder<MapEntryNode, MapNode> mapBuilder() {
+        return ImmutableMapNodeBuilder.create();
+    }
+
     public static CollectionNodeBuilder<MapEntryNode, MapNode> mapBuilder(final MapNode node) {
         return ImmutableMapNodeBuilder.create(node);
     }
@@ -169,7 +179,8 @@ public final class Builders {
         return ImmutableMapNodeSchemaAwareBuilder.create(schema);
     }
 
-    public static CollectionNodeBuilder<MapEntryNode, MapNode> mapBuilder(final ListSchemaNode schema, final MapNode node) {
+    public static CollectionNodeBuilder<MapEntryNode, MapNode> mapBuilder(final ListSchemaNode schema,
+            final MapNode node) {
         return ImmutableMapNodeSchemaAwareBuilder.create(schema, node);
     }
 
@@ -177,7 +188,8 @@ public final class Builders {
         return ImmutableAugmentationNodeBuilder.create();
     }
 
-    public static DataContainerNodeBuilder<AugmentationIdentifier, AugmentationNode> augmentationBuilder(final AugmentationSchema schema) {
+    public static DataContainerNodeBuilder<AugmentationIdentifier, AugmentationNode> augmentationBuilder(
+            final AugmentationSchema schema) {
         return ImmutableAugmentationNodeSchemaAwareBuilder.create(schema);
     }
 
@@ -192,5 +204,4 @@ public final class Builders {
     public static DataContainerNodeAttrBuilder<NodeIdentifier, UnkeyedListEntryNode> unkeyedListEntryBuilder() {
         return ImmutableUnkeyedListEntryNodeBuilder.create();
     }
-
 }