initial version of a json service getting the race states for all races of an event

This commit is contained in:
fmittag committed 2013-05-23 20:17:11 +02:00
1 parent 9fe35de42a
commit 5476d74f05
4 files changed
+149 -3

No files matched your search

@@ -41,5 +41,9 @@ public interface RaceLog extends Track<RaceLogEvent> {
* Remove a listener.
*/
void removeListener(RaceLogEventVisitor listener);
/**
* Checks if the race log is empty.
*/
boolean isEmpty();
}
@@ -93,6 +93,11 @@ public class RaceLogImpl extends TrackImpl<RaceLogEvent> implements RaceLog {
}
}
@Override
public boolean isEmpty() {
return getFirstRawFix() == null;
}
@Override
public void addListener(RaceLogEventVisitor listener) {
synchronized (listeners) {
@@ -124,5 +129,4 @@ public class RaceLogImpl extends TrackImpl<RaceLogEvent> implements RaceLog {
ois.defaultReadObject();
listeners = new HashSet<RaceLogEventVisitor>();
}
}