config-api: final parameters
[controller.git] / opendaylight / config / config-api / src / main / java / org / opendaylight / controller / config / api / JmxAttribute.java
index 244f22f58efdd5b1615806a2859fd50902b79172..068322cc89c29b8b927a301a1c26cf19db43afe7 100644 (file)
@@ -14,19 +14,22 @@ package org.opendaylight.controller.config.api;
 public class JmxAttribute {
     private final String attributeName;
 
-    public JmxAttribute(String attributeName) {
+    public JmxAttribute(final String attributeName) {
         if (attributeName == null) {
             throw new NullPointerException("Parameter 'attributeName' is null");
         }
         this.attributeName = attributeName;
     }
 
+    /**
+     * Name of attribute in JMX.
+     */
     public String getAttributeName() {
         return attributeName;
     }
 
     @Override
-    public boolean equals(Object o) {
+    public boolean equals(final Object o) {
         if (this == o) {
             return true;
         }
@@ -36,8 +39,7 @@ public class JmxAttribute {
 
         JmxAttribute that = (JmxAttribute) o;
 
-        if (attributeName != null ? !attributeName.equals(that.attributeName)
-                : that.attributeName != null) {
+        if (!attributeName.equals(that.attributeName)) {
             return false;
         }
 
@@ -46,7 +48,7 @@ public class JmxAttribute {
 
     @Override
     public int hashCode() {
-        return attributeName != null ? attributeName.hashCode() : 0;
+        return attributeName.hashCode();
     }
 
     @Override