mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-17 01:31:01 +00:00
added closing event for open ended device mappings
This commit is contained in:
1 parent
33fedad405
commit
a716775c44
25 files changed
+344
-125
No files matched your search
@@ -3,8 +3,14 @@ package com.sap.sailing.domain.common;
|
||||
import java.io.Serializable;
|
||||
|
||||
public interface TimeRange extends Comparable<TimeRange>, Serializable {
|
||||
/**
|
||||
* @return {@code null}, if the timepoint is at the beginning of time
|
||||
*/
|
||||
TimePoint from();
|
||||
|
||||
/**
|
||||
* @return {@code null}, if the timepoint is at the beginning of time
|
||||
*/
|
||||
TimePoint to();
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ public class TimeRangeImpl extends Pair<TimePoint, TimePoint> implements TimeRan
|
||||
|
||||
@Override
|
||||
public int compareTo(TimeRange other) {
|
||||
if (other.from() == from() && other.to() == to()) return 0;
|
||||
if (other.from().equals(from()) && other.to().equals(to())) return 0;
|
||||
return startsBefore(other) ? -1 : 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user