Simple changes to eliminate pmd warnings
[controller.git] / opendaylight / sal / api / src / main / java / org / opendaylight / controller / sal / core / Capabilities.java
index a41a0e22904482050bbcfe95c4338c2acb0dc520..b2005913d0dc214d5f2ef9d496969d1452020fde 100644 (file)
@@ -21,28 +21,28 @@ import javax.xml.bind.annotation.XmlRootElement;
  */
 @XmlRootElement
 public class Capabilities extends Property {
-       private static final long serialVersionUID = 1L;
-    @XmlElement
+        private static final long serialVersionUID = 1L;
+    @XmlElement(name="value")
     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
@@ -63,14 +63,15 @@ public class Capabilities extends Property {
         this.capabilitiesValue = 0;
     }
 
+    @Override
     public Capabilities clone() {
         return new Capabilities(this.capabilitiesValue);
     }
 
     public int getValue() {
-       return this.capabilitiesValue;
+        return this.capabilitiesValue;
     }
-    
+
     @Override
     public int hashCode() {
         final int prime = 31;
@@ -97,4 +98,9 @@ public class Capabilities extends Property {
     public String toString() {
         return "Capabilities[" + capabilitiesValue + "]";
     }
+
+    @Override
+    public String getStringValue() {
+        return Integer.toHexString(capabilitiesValue);
+    }
 }