Degrade DataNodeContainer.getChildNodes() from Set to Collection
[yangtools.git] / code-generator / maven-sal-api-gen-plugin / src / main / java / org / opendaylight / yangtools / yang / unified / doc / generator / GeneratorImpl.xtend
index 67b720511fbf142552170a55776b790d4a8c315a..bc4e267b0c6c429f1a52b8cf43dcf4cce1704d6b 100644 (file)
@@ -367,7 +367,7 @@ class GeneratorImpl {
         return targetPathNodes
     }
     
-    private def DataSchemaNode findNodeInChildNodes(QName findingNode, Set<DataSchemaNode> childNodes) {
+    private def DataSchemaNode findNodeInChildNodes(QName findingNode, Iterable<DataSchemaNode> childNodes) {
         for(child : childNodes) {
             if (child.QName.equals(findingNode))
                 return child;
@@ -950,7 +950,7 @@ class GeneratorImpl {
         '''
     }
 
-    def CharSequence printChildren(Set<DataSchemaNode> nodes, int level, InstanceIdentifier path) {
+    def CharSequence printChildren(Iterable<DataSchemaNode> nodes, int level, InstanceIdentifier path) {
         val anyxmlNodes = nodes.filter(AnyXmlSchemaNode)
         val leafNodes = nodes.filter(LeafSchemaNode)
         val leafListNodes = nodes.filter(LeafListSchemaNode)
@@ -1000,13 +1000,13 @@ class GeneratorImpl {
         '''
     }
 
-    def CharSequence xmlExample(Set<DataSchemaNode> nodes, QName name,InstanceIdentifier path) '''
+    def CharSequence xmlExample(Iterable<DataSchemaNode> nodes, QName name,InstanceIdentifier path) '''
     <pre>
         «xmlExampleTag(name,nodes.xmplExampleTags(path))»
     </pre>
     '''
 
-    def CharSequence xmplExampleTags(Set<DataSchemaNode> nodes, InstanceIdentifier identifier) '''
+    def CharSequence xmplExampleTags(Iterable<DataSchemaNode> nodes, InstanceIdentifier identifier) '''
         <!-- Child nodes -->
         «FOR node : nodes»
         <!-- «node.QName.localName» -->
@@ -1207,7 +1207,7 @@ class GeneratorImpl {
             val List<QName> path = schemaPath.path
         val StringBuilder pathString = new StringBuilder()
         if (schemaPath.absolute) {
-            pathString.append("/")
+            pathString.append('/')
         }
 
         val QName qname = path.get(0)
@@ -1235,15 +1235,15 @@ class GeneratorImpl {
 
                 var String prefix = name.prefix
                 var String moduleName
-                if (prefix == null || "".equals(prefix) || prefix.equals(module.prefix)) {
+                if (prefix == null || prefix.empty || prefix.equals(module.prefix)) {
                     moduleName = module.name
                 } else {
                     moduleName = imports.get(prefix)
                 }
                 pathString.append(moduleName)
-                pathString.append(":")
+                pathString.append(':')
                 pathString.append(name.localName)
-                pathString.append("/")
+                pathString.append('/')
                 if(node instanceof ChoiceNode && dataNode !== null) {
                     val DataSchemaNode caseNode = dataNode.childNodes.findFirst[DataSchemaNode e | e instanceof ChoiceCaseNode];
                     if(caseNode !== null) {