Coverage details for net.sf.tourviewer.TourSet

LineHitsSource
1 package net.sf.tourviewer;
2  
3 import java.util.ArrayList;
4 import java.util.Iterator;
5 import java.util.List;
6  
7 public class TourSet {
8  
9     private String personName;
10     private int personWeight;
11     private String deviceName;
120    private List<Tour> tours = new ArrayList<Tour>();
130    private List<Bike> bikes = new ArrayList<Bike>();
14     
150    public TourSet()
16     {
170    }
18     
19     @Override
20     public String toString()
21     {
220        return getClass().getName() + String.format("[personName=%s,personWeight=%d,deviceName=%s]",
230                personName, personWeight, deviceName);
24     }
25  
26     public Bike[] getBikes()
27     {
280        return bikes.toArray(new Bike[0]);
29     }
30     
31     public Bike getBikeByWheelPerimeter(int perimeter)
32     {
330        for (Bike bike : bikes) {
340            if (bike.getWheelPerimeter() == perimeter) {
350                return bike;
36             }
37         }
380        return null;
39     }
40     
41     public String getDeviceName()
42     {
430        return deviceName;
44     }
45     
46     public String getPersonName()
47     {
480        return personName;
49     }
50     
51     public int getPersonWeight()
52     {
530        return personWeight;
54     }
55     
56     public Tour[] getTours()
57     {
580        return tours.toArray(new Tour[0]);
59     }
60     
61     public void addBike(Bike bike)
62     {
630        bikes.add(bike);
640    }
65  
66     public void addTour(Tour tour)
67     {
680        tours.add(tour);
690    }
70     
71     public void setDeviceName(String deviceName)
72     {
730        this.deviceName = deviceName;
740    }
75     
76     public void setPersonName(String personName)
77     {
780        this.personName = personName;
790    }
80     
81     public void setPersonWeight(int personWeight)
82     {
830        this.personWeight = personWeight;
840    }
85     
86     public void setTours(List<Tour> tours)
87     {
880        this.tours = tours;
890    }
90     
91 }

this report was generated by version 1.0.5 of jcoverage.
visit www.jcoverage.com for updates.

copyright © 2003, jcoverage ltd. all rights reserved.
Java is a trademark of Sun Microsystems, Inc. in the United States and other countries.