com.tractrac.clientmodule.data
Class RouteData

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

public class RouteData
extends TimeObject

Represents a route of a Race

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

Constructor Summary
RouteData(java.util.List<ControlPoint> points, long timestamp)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.util.List<ControlPoint> getPoints()
           
 int hashCode()
           
static AttKey newAttKey()
           
static com.maptrack.client.io.TypeController subscribe(Race race, ICallbackData<Route,RouteData> callback)
          Sets up a subscription for the route of 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
 

Constructor Detail

RouteData

public RouteData(java.util.List<ControlPoint> points,
                 long timestamp)
Method Detail

newAttKey

public static AttKey newAttKey()

getPoints

public java.util.List<ControlPoint> getPoints()

subscribe

public static com.maptrack.client.io.TypeController subscribe(Race race,
                                                              ICallbackData<Route,RouteData> callback)
Sets up a subscription for the route of 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