}
/**
- * Returns statement definitions common for all versions
+ * Returns statement definitions common for all versions.
*
* @return map of common statement definitions
*/
}
/**
- * 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
}
/**
- * 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.
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) {
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);
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;
}