org.bidib.wizard.api.notification.NodesUpdate Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bidibwizard-api Show documentation
Show all versions of bidibwizard-api Show documentation
jBiDiB BiDiB Wizard API POM
The newest version!
package org.bidib.wizard.api.notification;
import java.util.List;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.bidib.api.json.types.NodeInfo.NodeAction;
import org.bidib.wizard.api.model.NodeInterface;
public class NodesUpdate {
private final String connectionId;
private final NodeAction nodeAction;
private final List nodes;
public NodesUpdate(final String connectionId, final NodeAction nodeAction, List nodes) {
this.connectionId = connectionId;
this.nodeAction = nodeAction;
this.nodes = nodes;
}
public String getConnectionId() {
return connectionId;
}
public NodeAction getNodeAction() {
return nodeAction;
}
public List getNodes() {
return nodes;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((connectionId == null) ? 0 : connectionId.hashCode());
result = prime * result + ((nodes == null) ? 0 : nodes.hashCode());
result = prime * result + ((nodeAction == null) ? 0 : nodeAction.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
NodesUpdate other = (NodesUpdate) obj;
if (connectionId == null) {
if (other.connectionId != null) {
return false;
}
}
else if (!connectionId.equals(other.connectionId)) {
return false;
}
if (nodes == null) {
if (other.nodes != null) {
return false;
}
}
else if (!nodes.equals(other.nodes)) {
return false;
}
if (nodeAction != other.nodeAction) {
return false;
}
return true;
}
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
}
}