KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > openi > project > Category


1 /*********************************************************************************
2  * The contents of this file are subject to the OpenI Public License Version 1.0
3  * ("License"); You may not use this file except in compliance with the
4  * License. You may obtain a copy of the License at
5  * http://www.openi.org/docs/LICENSE.txt
6  *
7  * Software distributed under the License is distributed on an "AS IS" basis,
8  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
9  * the specific language governing rights and limitations under the License.
10  *
11  * The Original Code is: OpenI Open Source
12  *
13  * The Initial Developer of the Original Code is Loyalty Matrix, Inc.
14  * Portions created by Loyalty Matrix, Inc. are
15  * Copyright (C) 2005 Loyalty Matrix, Inc.; All Rights Reserved.
16  *
17  * Contributor(s): ______________________________________.
18  *
19  ********************************************************************************/

20 package org.openi.project;
21
22 import java.io.Serializable JavaDoc;
23 import java.util.LinkedList JavaDoc;
24 import java.util.List JavaDoc;
25
26
27 /**
28  * Container of projects by category name
29  */

30 public class Category implements Serializable JavaDoc {
31     private String JavaDoc name;
32     private List JavaDoc projects;
33
34     /**
35      *
36      */

37     public Category() {
38         projects = new LinkedList JavaDoc();
39     }
40
41     /**
42      * @param category
43      */

44     public Category(String JavaDoc categoryName) {
45         this.name = categoryName;
46         projects = new LinkedList JavaDoc();
47     }
48
49     /**
50      * @return Returns the name.
51      */

52     public String JavaDoc getName() {
53         return name;
54     }
55
56     /**
57      * @param name The name to set.
58      */

59     public void setName(String JavaDoc name) {
60         this.name = name;
61     }
62
63     /**
64      * @return Returns the projects.
65      */

66     public List JavaDoc getProjects() {
67         return projects;
68     }
69
70     /**
71      * @param projects The projects to set.
72      */

73     public void setProjects(List JavaDoc projects) {
74         this.projects = projects;
75     }
76
77     public void addProject(Project project) {
78         this.projects.add(project);
79     }
80 }
81
Popular Tags