Added JavaDocs for new methods in TrackedRace and DynamicTrackedRace

This commit is contained in:
Steffen Schaefer committed 2016-06-23 16:54:53 +02:00
1 parent 4521d8c1d8
commit 91ff2cb9fc
2 files changed
+36

No files matched your search

@@ -80,9 +80,25 @@ public interface DynamicTrackedRace extends TrackedRace {
*/
DynamicGPSFixTrack<Mark, GPSFix> getOrCreateTrack(Mark mark);
/**
* Gets an existing {@link DynamicSensorFixTrack} or creates and returns a new one if there is none yet.
* @see #getDynamicSensorTrack(Competitor, String)
*
* @param competitor the competitor to get the track for
* @param trackName the name of the track to get
* @param newTrackFactory factory to create a new track instance if there isn't one yet for the competitor and the given track name.
* @return the track for the competitor and track name
*/
<FixT extends SensorFix, TrackT extends DynamicSensorFixTrack<Competitor, FixT>> TrackT getOrCreateSensorTrack(
Competitor competitor, String trackName, TrackFactory<TrackT> newTrackFactory);
/**
* @see TrackedRace#getSensorTrack(Competitor, String)
*
* @param competitor the competitor to get the track for
* @param trackName the name of the track to get
* @return the track associated to the given Competitor and name or <code>null</code> if there is none.
*/
<FixT extends SensorFix, TrackT extends DynamicSensorFixTrack<Competitor, FixT>> TrackT getDynamicSensorTrack(
Competitor competitor, String trackName);
@@ -188,6 +204,10 @@ public interface DynamicTrackedRace extends TrackedRace {
void invalidateEndTime();
/**
* Adds a {@link DynamicSensorFixTrack} for the given Competitor and track name.
* @see #getDynamicSensorTrack(Competitor, String)
*/
void addSensorTrack(Competitor trackedItem, String trackName, DynamicSensorFixTrack<Competitor, ?> track);
void onStopTracking(boolean preemptive);
@@ -215,6 +215,16 @@ public interface TrackedRace extends Serializable, IsManagedByCache<SharedDomain
*/
GPSFixTrack<Competitor, GPSFixMoving> getTrack(Competitor competitor);
/**
* {@link SensorFixTrack}s provide timed sensor data in addition to GPSFixes that are hold in {@link GPSFixTrack}s.
* In contrast to {@link GPSFixTrack}s there is a 1:n relation of competitors to tracks by introducing track names.
* So every type of track has an associated name. With this construct you can have track implementations that
* provide specific functionality based on the contained fix type.
*
* @param competitor the competitor to get the track for
* @param trackName the name of the track to get
* @return the track associated to the given Competitor and name or <code>null</code> if there is none.
*/
<FixT extends SensorFix, TrackT extends SensorFixTrack<Competitor, FixT>> TrackT getSensorTrack(Competitor competitor, String trackName);
/**
@@ -727,6 +737,9 @@ public interface TrackedRace extends Serializable, IsManagedByCache<SharedDomain
*/
void attachRegattaLog(RegattaLog regattaLog);
/**
* @return all currently attached {@link RegattaLog}s or an empty Iterable if there aren't any
*/
Iterable<RegattaLog> getAttachedRegattaLogs();
/**
@@ -923,5 +936,8 @@ public interface TrackedRace extends Serializable, IsManagedByCache<SharedDomain
default void unlockAfterSerializationRead() {
}
/**
* @return all currently attached {@link RaceLog}s or an empty Iterable if there aren't any
*/
Iterable<RaceLog> getAttachedRaceLogs();
}