KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > nightlabs > util > timepattern > TimePatternSetImpl


1 /* ************************************************************************** *
2  * Copyright (C) 2005 NightLabs GmbH, Marco Schulze, Alexander Bieber *
3  * All rights reserved. *
4  * http://www.NightLabs.de *
5  * *
6  * This program and the accompanying materials are free software; you can re- *
7  * distribute it and/or modify it under the terms of the GNU General Public *
8  * License as published by the Free Software Foundation; either ver 2 of the *
9  * License, or any later version. *
10  * *
11  * This module is distributed in the hope that it will be useful, but WITHOUT *
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FIT- *
13  * NESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more *
14  * details. *
15  * *
16  * You should have received a copy of the GNU General Public License along *
17  * with this module; if not, write to the Free Software Foundation, Inc.: *
18  * 59 Temple Place, Suite 330 *
19  * Boston MA 02111-1307 *
20  * USA *
21  * *
22  * Or get it online: *
23  * http://www.opensource.org/licenses/gpl-license.php *
24  * *
25  * In case, you want to use this module or parts of it in a proprietary pro- *
26  * ject, you can purchase it under the NightLabs Commercial License. Please *
27  * contact NightLabs GmbH under info AT nightlabs DOT com for more infos or *
28  * visit http://www.NightLabs.com *
29  * ************************************************************************** */

30
31 /*
32  * Created on Feb 10, 2005
33  *
34  */

35 package com.nightlabs.util.timepattern;
36
37 import java.util.HashSet JavaDoc;
38 import java.util.Set JavaDoc;
39
40 /**
41  * @author Alexander Bieber
42  */

43 public class TimePatternSetImpl extends TimePatternSet {
44
45     /**
46      *
47      */

48     public TimePatternSetImpl() {
49         super();
50     }
51
52     protected Set JavaDoc timePatterns;
53     
54     /**
55      * @see com.nightlabs.util.timepattern.TimePatternSet#getTimePatterns()
56      */

57     public Set JavaDoc getTimePatterns() {
58         if (timePatterns == null)
59             timePatterns = new HashSet JavaDoc();
60         return timePatterns;
61     }
62
63     /**
64      * @see com.nightlabs.util.timepattern.TimePatternSet#createTimePattern()
65      */

66     public TimePattern createTimePattern() {
67         TimePattern n = new TimePatternImpl(this);
68         getTimePatterns().add(n);
69         return n;
70     }
71
72     /**
73      * @see com.nightlabs.util.timepattern.TimePatternSet#createTimePattern(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)
74      */

75     public TimePattern createTimePattern(String JavaDoc _year, String JavaDoc _month,
76             String JavaDoc _day, String JavaDoc _dayOfWeek, String JavaDoc _hour, String JavaDoc _minute)
77             throws TimePatternFormatException
78     {
79         TimePattern n = new TimePatternImpl(this,_year,_month,_day,_dayOfWeek,_minute,_minute);
80         getTimePatterns().add(n);
81         return n;
82     }
83
84 }
85
Popular Tags