Fix checkstyle in yang-parser-spi
[yangtools.git] / yang / yang-parser-spi / src / main / java / org / opendaylight / yangtools / yang / parser / spi / meta / StatementSupportBundle.java
index 3d9c9375f92b03c265049ede136da8ecf30e2e3c..7fe7eb0b23bcc60ae5fa6b7256c2e8bc6da6f9bf 100644 (file)
@@ -45,7 +45,7 @@ public final class StatementSupportBundle implements Immutable, NamespaceBehavio
     }
 
     /**
-     * Returns statement definitions common for all versions
+     * Returns statement definitions common for all versions.
      *
      * @return map of common statement definitions
      */
@@ -54,8 +54,8 @@ public final class StatementSupportBundle implements Immutable, NamespaceBehavio
     }
 
     /**
-     * Returns statement definitions specific for requested version. Result of
-     * this method doesn't include common statement definitions.
+     * Returns statement definitions specific for requested version. Result of this method does nit include common
+     * statement definitions.
      *
      * @param version
      *            requested version
@@ -67,8 +67,8 @@ public final class StatementSupportBundle implements Immutable, NamespaceBehavio
     }
 
     /**
-     * Returns all version specific statement definitions. Result of this method
-     * doesn't include common statement definitions.
+     * Returns all version specific statement definitions. Result of this method does not include common statement
+     * definitions.
      *
      * @return table of all version specific statement definitions, it doesn't
      *         include common statement definitions.
@@ -101,10 +101,7 @@ public final class StatementSupportBundle implements Immutable, NamespaceBehavio
         if (potential != null) {
             Preconditions.checkState(namespace.equals(potential.getIdentifier()));
 
-            /*
-             * Safe cast, previous checkState checks equivalence of key from
-             * which type argument are derived
-             */
+            // Safe cast, previous checkState checks equivalence of key from which type argument are derived
             return (NamespaceBehaviour<K, V, N>) potential;
         }
         if (parent != null) {
@@ -180,6 +177,15 @@ public final class StatementSupportBundle implements Immutable, NamespaceBehavio
             return this;
         }
 
+        public <K, V, N extends IdentifierNamespace<K, V>> Builder addSupport(
+                final NamespaceBehaviour<K, V, N> namespaceSupport) {
+            final Class<N> identifier = namespaceSupport.getIdentifier();
+            Preconditions.checkState(!namespaces.containsKey(identifier));
+            Preconditions.checkState(!parent.hasNamespaceBehaviour(identifier));
+            namespaces.put(identifier, namespaceSupport);
+            return this;
+        }
+
         public Builder addVersionSpecificSupport(final YangVersion version,
                 final StatementSupport<?, ?, ?> definition) {
             Preconditions.checkNotNull(version);
@@ -199,15 +205,6 @@ public final class StatementSupportBundle implements Immutable, NamespaceBehavio
             return this;
         }
 
-        public <K, V, N extends IdentifierNamespace<K, V>> Builder addSupport(
-                final NamespaceBehaviour<K, V, N> namespaceSupport) {
-            final Class<N> identifier = namespaceSupport.getIdentifier();
-            Preconditions.checkState(!namespaces.containsKey(identifier));
-            Preconditions.checkState(!parent.hasNamespaceBehaviour(identifier));
-            namespaces.put(identifier, namespaceSupport);
-            return this;
-        }
-
         public Set<YangVersion> getSupportedVersions() {
             return supportedVersions;
         }