Source code: org/fenceui/beans/CompetitionResultList.java
1
2 package org.fenceui.beans;
3
4 import java.util.List;
5 import java.util.Vector;
6
7 import org.fencedb.base.Participation;
8 import org.fencedb.base.Competition;
9
10 /**
11 * Description of the Class
12 *
13 * @author vico
14 * @created June 11, 2003
15 */
16 public class CompetitionResultList
17 {
18
19 List resultList;
20 int index;
21
22
23 /**
24 *Constructor for the FencerList object
25 *
26 * @param resultList Description of the Parameter
27 */
28 public CompetitionResultList(List resultList)
29 {
30 if (resultList == null) {
31 resultList = (List)new Vector();
32 }
33 this.resultList = resultList;
34 this.index = 0;
35 }
36
37
38 /**
39 * Gets the size attribute of the FencerList object
40 *
41 * @return The size value
42 */
43 public int getSize()
44 {
45 return resultList.size();
46 }
47
48
49 /**
50 * Sets the index attribute of the FencerList object
51 *
52 * @param index The new index value
53 */
54 public void setIndex(int index)
55 {
56 this.index = index;
57 }
58
59
60 /**
61 * Gets the fencer attribute of the FencerList object
62 *
63 * @return The fencer value
64 */
65 public Participation getParticipation()
66 {
67 return (Participation)resultList.get(index);
68 }
69
70
71 /**
72 * Gets the competition attribute of the CompetitionResultList object
73 *
74 * @return The competition value
75 */
76 public Competition getCompetition()
77 {
78 return getParticipation().getCompetition();
79 }
80
81
82 /**
83 * Gets the competitionName attribute of the CompetitionResultList object
84 *
85 * @return The competitionName value
86 */
87 public String getCompetitionName()
88 {
89 return getCompetition().getName();
90 }
91
92
93 /**
94 * Gets the place attribute of the CompetitionResultList object
95 *
96 * @return The place value
97 */
98 public String getPlace()
99 {
100 return new Integer(getParticipation().getPlace()).toString();
101 }
102
103 }
104