aboutsummaryrefslogtreecommitdiffstats
path: root/adapters/mso-adapters-rest-interface/src
diff options
context:
space:
mode:
Diffstat (limited to 'adapters/mso-adapters-rest-interface/src')
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/Pool.java23
1 files changed, 19 insertions, 4 deletions
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/Pool.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/Pool.java
index 1c82907f80..ca3a9c5a8d 100644
--- a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/Pool.java
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/beans/Pool.java
@@ -20,14 +20,15 @@
package org.onap.so.openstack.beans;
+import java.io.Serializable;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
+import org.apache.commons.lang3.builder.EqualsBuilder;
-
-
-
-public class Pool {
+public class Pool implements Serializable {
private String start;
private String end;
+ private static final long serialVersionUID = 768026109321305392L;
/**
* @return the start
@@ -58,5 +59,19 @@ public class Pool {
public String toString() {
return "Allocation_pool [start=" + start + ", end=" + end + "]";
}
+
+ @Override
+ public boolean equals(final Object other) {
+ if (!(other instanceof Pool)) {
+ return false;
+ }
+ Pool castOther = (Pool) other;
+ return new EqualsBuilder().append(start, castOther.start).append(end, castOther.end).isEquals();
+ }
+ @Override
+ public int hashCode() {
+ return new HashCodeBuilder().append(start).append(end).toHashCode();
+ }
+
}