org.bidib.wizard.api.model.PositionAddressData 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
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);
}
}