Checkstyle enforcer
[controller.git] / opendaylight / sal / api / src / main / java / org / opendaylight / controller / sal / core / Capabilities.java
index d4c8cd1b56e71fd92a428db7a290f99dea1d5c00..fb121d7b9a48aa4c4c21b626de4f6baf5d661444 100644 (file)
@@ -12,9 +12,6 @@ package org.opendaylight.controller.sal.core;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
 
-import org.apache.commons.lang3.builder.EqualsBuilder;
-import org.apache.commons.lang3.builder.HashCodeBuilder;
-
 /**
  * @file   Capabilities.java
  *
@@ -24,28 +21,28 @@ import org.apache.commons.lang3.builder.HashCodeBuilder;
  */
 @XmlRootElement
 public class Capabilities extends Property {
-       private static final long serialVersionUID = 1L;
+        private static final long serialVersionUID = 1L;
     @XmlElement
     private int capabilitiesValue;
-    
-    public enum CapabilitiesType { 
-       FLOW_STATS_CAPABILITY(1<<0),
-       TABLE_STATS_CAPABILITY(1<<1),
-       PORT_STATS_CAPABILITY(1<<2),
-       STP_CAPABILITY(1<<3),
-       RSVD_CAPABILITY(1<<4),
-       IP_REASSEM_CAPABILITY(1<<5),
-       QUEUE_STATS_CAPABILITY(1<<6),
-       ARP_MATCH_IP_CAPABILITY(1<<7);
-       private final int ct;
-       CapabilitiesType(int val) {
-               this.ct = val;
-       }
-       public int getValue() {
-               return ct;
-       }
+
+    public enum CapabilitiesType {
+        FLOW_STATS_CAPABILITY(1<<0),
+        TABLE_STATS_CAPABILITY(1<<1),
+        PORT_STATS_CAPABILITY(1<<2),
+        STP_CAPABILITY(1<<3),
+        RSVD_CAPABILITY(1<<4),
+        IP_REASSEM_CAPABILITY(1<<5),
+        QUEUE_STATS_CAPABILITY(1<<6),
+        ARP_MATCH_IP_CAPABILITY(1<<7);
+        private final int ct;
+        CapabilitiesType(int val) {
+                this.ct = val;
+        }
+        public int getValue() {
+                return ct;
+        }
     }
-   
+
     public static final String CapabilitiesPropName = "capabilities";
     /**
      * Construct a Capabilities property
@@ -71,17 +68,29 @@ public class Capabilities extends Property {
     }
 
     public int getValue() {
-       return this.capabilitiesValue;
+        return this.capabilitiesValue;
     }
-    
+
     @Override
     public int hashCode() {
-        return HashCodeBuilder.reflectionHashCode(this);
+        final int prime = 31;
+        int result = super.hashCode();
+        result = prime * result + capabilitiesValue;
+        return result;
     }
 
     @Override
     public boolean equals(Object obj) {
-        return EqualsBuilder.reflectionEquals(this, obj);
+        if (this == obj)
+            return true;
+        if (!super.equals(obj))
+            return false;
+        if (getClass() != obj.getClass())
+            return false;
+        Capabilities other = (Capabilities) obj;
+        if (capabilitiesValue != other.capabilitiesValue)
+            return false;
+        return true;
     }
 
     @Override