Changed maximumEntries to correct int rather than long
[controller.git] / opendaylight / sal / api / src / main / java / org / opendaylight / controller / sal / reader / NodeTableStatistics.java
index 3b359cb812408d0112b07b5e653b6c3e567a9a5b..e4c3961a140da41ff0078c893fe198677c2353b7 100644 (file)
@@ -37,7 +37,63 @@ public class NodeTableStatistics implements Serializable {
     private long lookupCount;
     @XmlElement
     private long matchedCount;
+    @XmlElement
+    private int maximumEntries;
+
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + activeCount;
+        result = prime * result + (int) (lookupCount ^ (lookupCount >>> 32));
+        result = prime * result + (int) (matchedCount ^ (matchedCount >>> 32));
+        result = prime * result + maximumEntries;
+        result = prime * result + ((name == null) ? 0 : name.hashCode());
+        result = prime * result + ((nodeTable == null) ? 0 : nodeTable.hashCode());
+        return result;
+    }
 
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj == null) {
+            return false;
+        }
+        if (!(obj instanceof NodeTableStatistics)) {
+            return false;
+        }
+        NodeTableStatistics other = (NodeTableStatistics) obj;
+        if (activeCount != other.activeCount) {
+            return false;
+        }
+        if (lookupCount != other.lookupCount) {
+            return false;
+        }
+        if (matchedCount != other.matchedCount) {
+            return false;
+        }
+        if (maximumEntries != other.maximumEntries) {
+            return false;
+        }
+        if (name == null) {
+            if (other.name != null) {
+                return false;
+            }
+        } else if (!name.equals(other.name)) {
+            return false;
+        }
+        if (nodeTable == null) {
+            if (other.nodeTable != null) {
+                return false;
+            }
+        } else if (!nodeTable.equals(other.nodeTable)) {
+            return false;
+        }
+        return true;
+    }
 
     //To Satisfy JAXB
     public NodeTableStatistics() {
@@ -114,11 +170,26 @@ public class NodeTableStatistics implements Serializable {
         this.matchedCount = matchedCount;
     }
 
+    /**
+     * @return the maximumEntries
+     */
+    public int getMaximumEntries() {
+        return maximumEntries;
+    }
+
+    /**
+     * @param maximumEntries the maximumEntries to set
+     */
+    public void setMaximumEntries(int maximumEntries) {
+        this.maximumEntries = maximumEntries;
+    }
+
     @Override
     public String toString() {
         return "NodeTableStats[tableId = " + nodeTable
                 + ", activeCount = " + activeCount
                 + ", lookupCount = " + lookupCount
-                + ", matchedCount = " + matchedCount + "]";
+                + ", matchedCount = " + matchedCount
+                + ", maximumEntries = " + maximumEntries + "]";
     }
 }