KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > league > util > Match


1 /*
2  * Match.java
3  *
4  * Created on March 30, 2005, 4:20 PM
5  *
6  * To change this template, choose Tools | Options and locate the template under
7  * the Source Creation and Management node. Right-click the template and choose
8  * Open. You can then make changes to the template in the Source Editor.
9  */

10
11 package league.util;
12
13 import java.util.ArrayList JavaDoc;
14 import java.util.Collection JavaDoc;
15 import java.util.Date JavaDoc;
16
17 /**
18  *
19  * @author honza
20  */

21 public class Match extends Object JavaDoc implements java.io.Serializable JavaDoc {
22     private Date JavaDoc date=null;
23     private ArrayList JavaDoc results=null;
24     private Integer JavaDoc id=null;
25     
26     public Match() {
27     }
28     
29     /** Creates a new instance of Match */
30     public Match( Integer JavaDoc id, Date JavaDoc date) {
31         this.date=date;
32         this.id=id;
33         results=new ArrayList JavaDoc();
34     }
35     
36     public void addResult(Result res) {
37         results.add(res);
38     }
39     
40     public Date JavaDoc getDate() {
41         return date;
42     }
43     
44     public Collection JavaDoc getResults() {
45         return results;
46     }
47     public Integer JavaDoc getId() {
48         return id;
49     }
50     
51     public String JavaDoc toString() {
52         return "MATCH: " + id + " " + date + " " + results.get(0) +" "+ results.get(1);
53     }
54 }
55
Popular Tags