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

org.bidib.wizard.api.model.PositionAddressData Maven / Gradle / Ivy

There is a newer version: 2.0.29
Show newest version
package org.bidib.wizard.api.model;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

public class PositionAddressData {

    private int decoderAddress;

    private long lastSeenTimestamp;

    public PositionAddressData(int decoderAddress, long lastSeenTimestamp) {
        this.decoderAddress = decoderAddress;
        this.lastSeenTimestamp = lastSeenTimestamp;
    }

    /**
     * @return the decoderAddress
     */
    public int getDecoderAddress() {
        return decoderAddress;
    }

    /**
     * @param decoderAddress
     *            the decoderAddress to set
     */
    public void setDecoderAddress(int decoderAddress) {
        this.decoderAddress = decoderAddress;
    }

    /**
     * @return the lastSeenTimestamp
     */
    public long getLastSeenTimestamp() {
        return lastSeenTimestamp;
    }

    /**
     * @param lastSeenTimestamp
     *            the lastSeenTimestamp to set
     */
    public void setLastSeenTimestamp(long lastSeenTimestamp) {
        this.lastSeenTimestamp = lastSeenTimestamp;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + decoderAddress;
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (!(obj instanceof PositionAddressData))
            return false;
        PositionAddressData other = (PositionAddressData) obj;
        if (decoderAddress != other.decoderAddress)
            return false;
        return true;
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy