redis.clients.jedis.timeseries.TSElement Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of org.apache.servicemix.bundles.jedis
Show all versions of org.apache.servicemix.bundles.jedis
This OSGi bundle wraps the ${pkgArtifactId} ${pkgVersion} jar file.
The newest version!
package redis.clients.jedis.timeseries;
public class TSElement {
private final long timestamp;
private final double value;
public TSElement(long timestamp, double value) {
this.timestamp = timestamp;
this.value = value;
}
public long getTimestamp() {
return timestamp;
}
public double getValue() {
return value;
}
@Override
public int hashCode() {
return 31 * Long.hashCode(timestamp) + Long.hashCode(Double.doubleToLongBits(value));
}
@Override
public boolean equals(Object obj) {
if (obj == null) return false;
if (obj == this) return true;
if (!(obj instanceof TSElement)) return false;
TSElement other = (TSElement) obj;
return this.timestamp == other.timestamp
&& this.value == other.value;
}
@Override
public String toString() {
return "(" + timestamp + ":" + value + ")";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy