Remove yang-test
[controller.git] / opendaylight / config / config-api / src / main / java / org / opendaylight / controller / config / api / IdentityAttributeRef.java
index 5ad6e0da8d2bf8a29d8d403783e378c5ab950346..735a6e1d272356cf748d39529c3de1e9c062059f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
+ * Copyright (c) 2013, 2017 Cisco Systems, Inc. and others.  All rights reserved.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
@@ -7,56 +7,54 @@
  */
 package org.opendaylight.controller.config.api;
 
-import org.opendaylight.yangtools.yang.binding.BaseIdentity;
-
 import java.beans.ConstructorProperties;
+import org.opendaylight.yangtools.yang.binding.BaseIdentity;
 
 public final class IdentityAttributeRef {
 
     public static final String QNAME_ATTR_NAME = "qNameOfIdentity";
 
-    private final String qNameOfIdentity;
+    private final String qualifiedNameOfIdentity;
 
     @ConstructorProperties(QNAME_ATTR_NAME)
-    public IdentityAttributeRef(String qNameOfIdentity) {
-        if (qNameOfIdentity == null) {
+    public IdentityAttributeRef(final String qualifiedNameOfIdentity) {
+        if (qualifiedNameOfIdentity == null) {
             throw new NullPointerException("Parameter " + QNAME_ATTR_NAME + " is null");
         }
-        this.qNameOfIdentity = qNameOfIdentity;
+        this.qualifiedNameOfIdentity = qualifiedNameOfIdentity;
     }
 
     public String getqNameOfIdentity() {
-        return qNameOfIdentity;
+        return qualifiedNameOfIdentity;
     }
 
-    public <T extends BaseIdentity> Class<? extends T> resolveIdentity(DependencyResolver resolver, Class<T> baseIdentity) {
+    public <T extends BaseIdentity> Class<? extends T> resolveIdentity(final DependencyResolver resolver,
+            final Class<T> baseIdentity) {
         return resolver.resolveIdentity(this, baseIdentity);
     }
 
-    public <T extends BaseIdentity> void validateIdentity(DependencyResolver resolver, Class<T> baseIdentity, JmxAttribute jmxAttribute) {
+    public <T extends BaseIdentity> void validateIdentity(final DependencyResolver resolver,
+            final Class<T> baseIdentity, final JmxAttribute jmxAttribute) {
         resolver.validateIdentity(this, baseIdentity, jmxAttribute);
     }
 
     @Override
     public String toString() {
-        final StringBuffer sb = new StringBuffer("IdentityAttributeRef{");
-        sb.append("qNameOfIdentity='").append(qNameOfIdentity).append('\'');
-        sb.append('}');
-        return sb.toString();
+        return "IdentityAttributeRef{" + "qualifiedNameOfIdentity='" + qualifiedNameOfIdentity + "'}";
     }
 
     @Override
-    public boolean equals(Object o) {
-        if (this == o) {
+    public boolean equals(final Object object) {
+        if (this == object) {
             return true;
         }
-        if (!(o instanceof IdentityAttributeRef)) {
+        if (!(object instanceof IdentityAttributeRef)) {
             return false;
         }
 
-        IdentityAttributeRef that = (IdentityAttributeRef) o;
+        IdentityAttributeRef that = (IdentityAttributeRef) object;
 
-        if (!qNameOfIdentity.equals(that.qNameOfIdentity)) {
+        if (!qualifiedNameOfIdentity.equals(that.qualifiedNameOfIdentity)) {
             return false;
         }
 
@@ -65,7 +63,6 @@ public final class IdentityAttributeRef {
 
     @Override
     public int hashCode() {
-        return qNameOfIdentity.hashCode();
+        return qualifiedNameOfIdentity.hashCode();
     }
-
 }