com.tractrac.clientmodule.data
Class MarkPassingsData

java.lang.Object
  extended by com.tractrac.clientmodule.details.Attachments
      extended by com.tractrac.clientmodule.data.TimeObject
          extended by com.tractrac.clientmodule.data.MarkPassingsData
All Implemented Interfaces:
java.lang.Comparable<TimeObject>

public class MarkPassingsData
extends TimeObject

Represents mark passings for a RaceCompetitor.

The static method subscribe(com.tractrac.clientmodule.Race, com.tractrac.clientmodule.data.ICallbackData) can be used to receive positions.

Custom data may be attached to each class instance.

Version:
2.0
Author:
TracTrac

Nested Class Summary
static class MarkPassingsData.Entry
          Represents a control point with a corresponding time stamp for when the mark/control point was passed
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.util.List<MarkPassingsData.Entry> getPassings()
          Returns a list of mark/control point passings for a corresponding RaceCompetitor
 int hashCode()
           
static AttKey newAttKey()
           
static com.maptrack.client.io.TypeController subscribe(Race race, ICallbackData<RaceCompetitor,MarkPassingsData> callback)
          Sets up a subscription for mark passings for a given Race.
 java.lang.String toString()
           
 
Methods inherited from class com.tractrac.clientmodule.data.TimeObject
compareTo, getTimestamp
 
Methods inherited from class com.tractrac.clientmodule.details.Attachments
getAttachment, setAttachment
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

newAttKey

public static AttKey newAttKey()

getPassings

public java.util.List<MarkPassingsData.Entry> getPassings()
Returns a list of mark/control point passings for a corresponding RaceCompetitor

Returns:
a list of mark/control point passings

subscribe

public static com.maptrack.client.io.TypeController subscribe(Race race,
                                                              ICallbackData<RaceCompetitor,MarkPassingsData> callback)
Sets up a subscription for mark passings for a given Race.

The method returns immediately and the data are subsequently sent to a given callback, as they are received.

The returned type controller should be added to a DataController.

Parameters:
race - the race from which to request the data
callback - the callback to receive the data
Returns:
the type controller

toString

public java.lang.String toString()
Overrides:
toString in class TimeObject

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class TimeObject

hashCode

public int hashCode()
Overrides:
hashCode in class TimeObject