Commit 6bfa31e1 authored by R.W.Majeed's avatar R.W.Majeed
Browse files

now comparable

parent e5be0fb5
......@@ -44,7 +44,7 @@ import de.sekmi.histream.xml.DateTimeAccuracyAdapter;
*
*/
@XmlJavaTypeAdapter(DateTimeAccuracyAdapter.class)
public class DateTimeAccuracy implements Temporal {
public class DateTimeAccuracy implements Temporal, Comparable<DateTimeAccuracy> {
private LocalDateTime dateTime;
private ChronoUnit accuracy;
......@@ -284,4 +284,8 @@ public class DateTimeAccuracy implements Temporal {
return new DateTimeAccuracy(year,month,day, hour, minute, seconds);
// milliseconds not supported for now
}
@Override
public int compareTo(DateTimeAccuracy o) {
return dateTime.compareTo(o.dateTime);
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment