Line | Hits | Source |
---|---|---|
1 | package net.sf.tourviewer.lib; | |
2 | ||
3 | import java.util.ArrayList; | |
4 | import java.util.Date; | |
5 | import java.util.List; | |
6 | ||
7 | public class TourSet { | |
8 | ||
9 | 0 | private List<Bike> bikes = new ArrayList<Bike>(); |
10 | private Date dateOfBirth; | |
11 | private Device device; | |
12 | private String personName; | |
13 | private int personWeight; | |
14 | private String team; | |
15 | private int totalAltitudeDown; | |
16 | private int totalAltitudeUp; | |
17 | private long totalDistance; | |
18 | private long totalTravelTime; | |
19 | 0 | private List<Tour> tours = new ArrayList<Tour>(); |
20 | ||
21 | public TourSet() | |
22 | 0 | { |
23 | 0 | } |
24 | ||
25 | public void addBike(Bike bike) | |
26 | { | |
27 | 0 | bikes.add(bike); |
28 | 0 | } |
29 | ||
30 | public void addTour(Tour tour) | |
31 | { | |
32 | 0 | tours.add(tour); |
33 | 0 | } |
34 | ||
35 | public Bike getBikeByWheelPerimeter(int perimeter) | |
36 | { | |
37 | 0 | for (Bike bike : bikes) { |
38 | 0 | if (bike.getWheelPerimeter() == perimeter) { |
39 | 0 | return bike; |
40 | } | |
41 | 0 | } |
42 | 0 | return null; |
43 | } | |
44 | ||
45 | public Bike[] getBikes() | |
46 | { | |
47 | 0 | return bikes.toArray(new Bike[0]); |
48 | } | |
49 | ||
50 | public Date getDateOfBirth() | |
51 | { | |
52 | 0 | return dateOfBirth; |
53 | } | |
54 | ||
55 | public Device getDevice() | |
56 | { | |
57 | 0 | return device; |
58 | } | |
59 | ||
60 | public String getPersonName() | |
61 | { | |
62 | 0 | return personName; |
63 | } | |
64 | ||
65 | public int getPersonWeight() | |
66 | { | |
67 | 0 | return personWeight; |
68 | } | |
69 | ||
70 | public String getTeam() | |
71 | { | |
72 | 0 | return team; |
73 | } | |
74 | ||
75 | public int getTotalAltitudeDown() | |
76 | { | |
77 | 0 | return totalAltitudeDown; |
78 | } | |
79 | ||
80 | public int getTotalAltitudeUp() | |
81 | { | |
82 | 0 | return totalAltitudeUp; |
83 | } | |
84 | ||
85 | public long getTotalDistance() | |
86 | { | |
87 | 0 | return totalDistance; |
88 | } | |
89 | ||
90 | public long getTotalTravelTime() | |
91 | { | |
92 | 0 | return totalTravelTime; |
93 | } | |
94 | ||
95 | public Tour[] getTours() | |
96 | { | |
97 | 0 | return tours.toArray(new Tour[0]); |
98 | } | |
99 | ||
100 | public void setDateOfBirth(Date dateOfBirth) | |
101 | { | |
102 | 0 | this.dateOfBirth = dateOfBirth; |
103 | 0 | } |
104 | ||
105 | ||
106 | public void setDevice(Device device) | |
107 | { | |
108 | 0 | this.device = device; |
109 | 0 | } |
110 | ||
111 | ||
112 | public void setPersonName(String personName) | |
113 | { | |
114 | 0 | this.personName = personName; |
115 | 0 | } |
116 | ||
117 | ||
118 | public void setPersonWeight(int personWeight) | |
119 | { | |
120 | 0 | this.personWeight = personWeight; |
121 | 0 | } |
122 | ||
123 | ||
124 | public void setTeam(String team) | |
125 | { | |
126 | 0 | this.team = team; |
127 | 0 | } |
128 | ||
129 | ||
130 | public void setTotalAltitudeDown(int totalAltitudeDown) | |
131 | { | |
132 | 0 | this.totalAltitudeDown = totalAltitudeDown; |
133 | 0 | } |
134 | ||
135 | ||
136 | public void setTotalAltitudeUp(int totalAltitudeUp) | |
137 | { | |
138 | 0 | this.totalAltitudeUp = totalAltitudeUp; |
139 | 0 | } |
140 | ||
141 | ||
142 | public void setTotalDistance(long totalDistance) | |
143 | { | |
144 | 0 | this.totalDistance = totalDistance; |
145 | 0 | } |
146 | ||
147 | ||
148 | public void setTotalTravelTime(long totalTravelTime) | |
149 | { | |
150 | 0 | this.totalTravelTime = totalTravelTime; |
151 | 0 | } |
152 | ||
153 | ||
154 | public void setTours(List<Tour> tours) | |
155 | { | |
156 | 0 | this.tours = tours; |
157 | 0 | } |
158 | ||
159 | ||
160 | @Override | |
161 | public String toString() | |
162 | { | |
163 | 0 | return getClass().getName() + String.format("[personName=%s,personWeight=%d,device=%s]", |
164 | personName, personWeight, device); | |
165 | } | |
166 | ||
167 | } |
this report was generated by version 1.0.5 of jcoverage. |
copyright © 2003, jcoverage ltd. all rights reserved. |