forked from Wattics/api-client-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMeasurement.java
More file actions
34 lines (25 loc) · 716 Bytes
/
Copy pathMeasurement.java
File metadata and controls
34 lines (25 loc) · 716 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package com.wattics;
import com.google.gson.annotations.SerializedName;
import java.time.LocalDateTime;
public abstract class Measurement implements Comparable {
protected String id;
@SerializedName("tsISO8601")
protected LocalDateTime timestamp;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public LocalDateTime getTimestamp() {
return timestamp;
}
public void setTimestamp(LocalDateTime timestamp) {
this.timestamp = timestamp;
}
@Override
public int compareTo(Object o) {
Measurement that = (Measurement) o;
return this.timestamp.compareTo(that.timestamp);
}
}