mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-20 19:20:04 +00:00
added protest start time to status panel; fixed date display; added assertions about non-nullness of protest time range and its bounds
Change-Id: I8697c5083fa7e5b5f3cfd0092256cbd9a67d049a
This commit is contained in:
1 parent
c3f18e7451
commit
e691bca866
9 files changed
+35
-16
No files matched your search
+3
-1
@@ -9,7 +9,9 @@ import com.sap.sse.common.TimeRange;
|
||||
public interface RaceLogProtestStartTimeEvent extends RaceLogEvent {
|
||||
|
||||
/**
|
||||
* Returns the time range of the race's protest time.
|
||||
* Returns the time range of the race's protest time. The result is never {@code null}
|
||||
* and the {@link TimeRange} returned always has a valid {@link TimeRange#from() start}
|
||||
* and {@link TimeRange#to() end}.
|
||||
*/
|
||||
TimeRange getProtestTime();
|
||||
}
|
||||
+1
@@ -16,6 +16,7 @@ public class RaceLogProtestStartTimeEventImpl extends RaceLogEventImpl implement
|
||||
public RaceLogProtestStartTimeEventImpl(TimePoint createdAt, TimePoint pTimePoint, AbstractLogEventAuthor author,
|
||||
Serializable pId, int pPassId, TimeRange protestTime) {
|
||||
super(createdAt, pTimePoint, author, pId, pPassId);
|
||||
assert protestTime != null && protestTime.from() != null && protestTime.to() != null;
|
||||
this.protestTime = protestTime;
|
||||
}
|
||||
|
||||
|
||||
+1
@@ -171,6 +171,7 @@ public class RaceStateImpl extends ReadonlyRaceStateImpl implements RaceState {
|
||||
|
||||
@Override
|
||||
public void setProtestTime(TimePoint now, TimeRange protestTime) {
|
||||
assert protestTime != null && protestTime.from() != null && protestTime.to() != null;
|
||||
raceLog.add(new RaceLogProtestStartTimeEventImpl(now, author, raceLog.getCurrentPassId(), protestTime));
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user