added closing event for open ended device mappings

This commit is contained in:
Fredrik Teschke committed 2014-03-16 20:46:16 +01:00
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();
/**
@@ -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;
}