All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.bidib.wizard.localhost.client.model.SubscribedClientModel Maven / Gradle / Ivy

There is a newer version: 2.0.29
Show newest version
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();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy