Merge "Remove raw references to Map in XSQL"
[controller.git] / opendaylight / config / config-api / src / main / java / org / opendaylight / controller / config / api / ModuleIdentifier.java
index f5ccb4a53cb6bcb07ef3d547d950fa9e76720fa8..7baaf9f6e45021bb87dced0ee189fa889767e52d 100644 (file)
@@ -7,17 +7,19 @@
  */
 package org.opendaylight.controller.config.api;
 
-public class ModuleIdentifier {
+import org.opendaylight.yangtools.concepts.Identifier;
+
+public class ModuleIdentifier implements Identifier {
     private static final long serialVersionUID = 1L;
     private final String factoryName, instanceName;
 
     public ModuleIdentifier(String factoryName, String instanceName) {
-        if (factoryName == null)
-            throw new IllegalArgumentException(
-                    "Parameter 'factoryName' is null");
-        if (instanceName == null)
-            throw new IllegalArgumentException(
-                    "Parameter 'instanceName' is null");
+        if (factoryName == null) {
+            throw new IllegalArgumentException("Parameter 'factoryName' is null");
+        }
+        if (instanceName == null) {
+            throw new IllegalArgumentException("Parameter 'instanceName' is null");
+        }
         this.factoryName = factoryName;
         this.instanceName = instanceName;
     }
@@ -32,17 +34,21 @@ public class ModuleIdentifier {
 
     @Override
     public boolean equals(Object o) {
-        if (this == o)
+        if (this == o) {
             return true;
-        if (o == null || getClass() != o.getClass())
+        }
+        if (o == null || getClass() != o.getClass()) {
             return false;
+        }
 
         ModuleIdentifier that = (ModuleIdentifier) o;
 
-        if (!factoryName.equals(that.factoryName))
+        if (!factoryName.equals(that.factoryName)) {
             return false;
-        if (!instanceName.equals(that.instanceName))
+        }
+        if (!instanceName.equals(that.instanceName)) {
             return false;
+        }
 
         return true;
     }