package org.onap.dmaap.dbcapi.model;
+import com.google.common.base.Objects;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Date;
+import java.util.List;
+
import org.json.simple.*;
import org.json.simple.parser.*;
import javax.xml.bind.annotation.XmlRootElement;
private String subscriberRole;
@ApiModelProperty( value="an array of `MR_Client` objects associated to this `Topic`")
- private ArrayList<MR_Client> clients;
+ private List<MR_Client> clients;
}
- public void setClients(ArrayList<MR_Client> clients) {
+ public void setClients(List<MR_Client> clients) {
this.clients = clients;
}
- public ArrayList<MR_Client> getClients() {
+ public List<MR_Client> getClients() {
return clients;
}
public byte[] getBytes() {
return toProvJSON().getBytes(StandardCharsets.UTF_8);
}
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Topic topic = (Topic) o;
+ return Objects.equal(fqtn, topic.fqtn) &&
+ Objects.equal(topicName, topic.topicName) &&
+ Objects.equal(tnxEnabled, topic.tnxEnabled) &&
+ Objects.equal(owner, topic.owner);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hashCode(fqtn, topicName, tnxEnabled, owner);
+ }
}