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