-
Notifications
You must be signed in to change notification settings - Fork 1
2. Domain classes
Parsa Dahesh edited this page Apr 13, 2021
·
2 revisions
The following java classes are in the com.github.parsad23.motogpapi.domain
package.
An object of RiderSession
contains the following information:
Parameter | Type | Description | Example |
---|---|---|---|
number |
int |
Race number of a rider; -1 in case the data is not available |
46 |
name |
String |
Rider's name | Valentino Rossi |
nationality |
String |
Rider's nationality | Italy |
team |
String |
Rider's team name | Monster Energy Yamaha MotoGP |
position |
int |
Rider's position; 0 in case the rider did not classify or did not finish the race |
5 |
time |
int |
Lap time or the total race time in milliseconds | 2557502 |
laps |
int |
Number of completed laps | 22 |
ElementStandings
is an abstract class which is expanded by RiderStandings
,TeamStandings
and ConstructorStandings
. It constains the following information:
Paramter | Type | Description | Example for RiderStandings | Example for ConstructorStandings | Example for TeamStandings |
---|---|---|---|---|---|
name |
String |
Element's name | Marc Márquez |
Yamaha |
Ducati Team |
position |
int |
Element's position | 1 |
2 |
2 |
points |
double |
Element's total points | 420.0 |
321.0 |
442.0 |
results |
List<Double> |
Element's race results | [20.0, 25.0, 0.0, ...] |
[25.0, 25.0, 25.0, ...] |
[33.0, 16.0, 7.0, ...] |
The Category
enum class has three possible values:
-
MotoGP
that represents the MotoGP and the 500cc class (active from the 1949 season) -
Moto2
that represents the Moto2 class (active from the 2010 season) -
Moto3
that represents the Moto3 class (active from the 2012 season)
The Session
enum class represents the sessions in a grandprix weekend and each session has a String
value attached to it (requestable with the getValue()
method). The class has the following values:
-
FP1
->"1st Practice"
-
FP2
->"2nd Practice"
-
FP3
->"3rd Practice"
-
FP4
->"4th Practice"
-
QP1
->"1st Qualifying"
-
QP2
->"2nd Qualifying"
-
QP
->"Qualifying"
-
GRID
->"Grid"
-
WARMUP
->"Warm Up"
-
RACE
->"Race"