KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > tests > jfun > parsec > rfc822 > Date


1 /*
2  * Created on Dec 10, 2004
3  *
4  * Author Ben Yu
5  */

6 package tests.jfun.parsec.rfc822;
7
8 /**
9  * @author Ben Yu
10  *
11  * Dec 10, 2004
12  */

13 public final class Date {
14   private final String JavaDoc day;
15   private final String JavaDoc month;
16   private final String JavaDoc year;
17   
18   /**
19    * @param day
20    * @param month
21    * @param year
22    */

23   Date(final String JavaDoc day, final String JavaDoc month, final String JavaDoc year) {
24     this.day = day;
25     this.month = month;
26     this.year = year;
27   }
28   /**
29    * @return Returns the day.
30    */

31   public String JavaDoc getDay() {
32     return day;
33   }
34   /**
35    * @return Returns the month.
36    */

37   public String JavaDoc getMonth() {
38     return month;
39   }
40   /**
41    * @return Returns the year.
42    */

43   public String JavaDoc getYear() {
44     return year;
45   }
46   public String JavaDoc toString(){
47     return day + " " + month + " " + year;
48   }
49 }
50
Popular Tags