org.bidib.wizard.localhost.client.model.SubscribedClientModel Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bidibwizard-localhost-client Show documentation
Show all versions of bidibwizard-localhost-client Show documentation
jBiDiB BiDiB Wizard localhost client POM
package org.bidib.wizard.localhost.client.model;
import java.util.Arrays;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.jgoodies.binding.beans.Model;
public class SubscribedClientModel extends Model {
private static final long serialVersionUID = 1L;
private static final Logger LOGGER = LoggerFactory.getLogger(SubscribedClientModel.class);
private final byte[] nodeAddress;
private final Long uniqueId;
private Integer messageClasses;
public SubscribedClientModel(byte[] nodeAddress, final Long uniqueId) {
this.nodeAddress = nodeAddress;
this.uniqueId = uniqueId;
}
/**
* @return the nodeAddress
*/
public byte[] getNodeAddress() {
return nodeAddress;
}
/**
* @return the uniqueId
*/
public Long getUniqueId() {
return uniqueId;
}
/**
* @return the messageClasses
*/
public Integer getMessageClasses() {
return messageClasses;
}
/**
* @param messageClasses the messageClasses to set
*/
public void setMessageClasses(Integer messageClasses) {
this.messageClasses = messageClasses;
}
@Override
public boolean equals(Object obj) {
if (obj instanceof SubscribedClientModel) {
SubscribedClientModel other = (SubscribedClientModel) obj;
if (Arrays.equals(nodeAddress, other.nodeAddress)) {
return true;
}
}
return false;
}
@Override
public int hashCode() {
return nodeAddress.hashCode();
}
}