Added JavaDocs for SensorFixMapper related classes

This commit is contained in:
Steffen Schaefer committed 2016-06-23 12:13:54 +02:00
1 parent ec3c8d42ea
commit 2c5dc756d7
2 files changed
+31

No files matched your search

@@ -11,6 +11,10 @@ import com.sap.sailing.domain.tracking.DynamicSensorFixTrack;
import com.sap.sailing.domain.tracking.DynamicTrackedRace;
import com.sap.sailing.domain.tracking.impl.BravoFixTrackImpl;
/**
* {@link SensorFixMapper} to handle {@link BravoFix}es.
*
*/
public class BravoDataFixMapper implements SensorFixMapper<DoubleVectorFix, DynamicSensorFixTrack<Competitor, BravoFix>, Competitor> {
@Override
@@ -5,11 +5,38 @@ import com.sap.sailing.domain.tracking.Track;
import com.sap.sse.common.Timed;
import com.sap.sse.common.WithID;
/**
* This is used by the fix tracking mechanism to make fixes available in a track.
* This makes it possible to e.g. map fixes to another type before adding them to the track.
*
* @param <FixT> the type of fix this mapper handles
* @param <TrackT> the type of track this mapper adds the fixes to
* @param <K> the type of item the track is mapped to
*/
public interface SensorFixMapper<FixT extends Timed, TrackT extends Track<?>, K extends WithID> {
/**
* Extracts the track from the TrackedRace or creates a new one if it doesn't already exist.
*
* @param race the race to get the track for
* @param key the mapped item to get the track for
* @return the track to add fixes to
*/
TrackT getTrack(DynamicTrackedRace race, K key);
/**
* Adds a fix to the given Track. This can also be used to map fixes to another type if necessary.
*
* @param track the track to add the fix to
* @param fix the fix to add
*/
void addFix(TrackT track, FixT fix);
/**
* Checks if this mapper can be used for tracks/fixes that are associated to a given RegattaLog device mapping event.
*
* @param eventType the type of the RegattaLog device mapping event
* @return <code>true</code> if this mapper can handle fixes for the event, <code>false</code> otherwise.
*/
boolean isResponsibleFor(Class<?> eventType);
}