KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > sapia > validator > examples > Company


1 package org.sapia.validator.examples;
2
3 import java.util.ArrayList JavaDoc;
4 import java.util.List JavaDoc;
5
6 /**
7  * @author Yanick Duchesne
8  * <dl>
9  * <dt><b>Copyright:</b><dd>Copyright &#169; 2002-2003 <a HREF="http://www.sapia-oss.org">Sapia Open Source Software</a>. All Rights Reserved.</dd></dt>
10  * <dt><b>License:</b><dd>Read the license.txt file of the jar or visit the
11  * <a HREF="http://www.sapia-oss.org/license.html">license page</a> at the Sapia OSS web site</dd></dt>
12  * </dl>
13  */

14 public class Company {
15   private String JavaDoc _name;
16   private List JavaDoc _empls = new ArrayList JavaDoc();
17
18   /**
19    * Constructor for Company.
20    */

21   public Company(String JavaDoc name) {
22     _name = name;
23   }
24
25   public String JavaDoc getName() {
26     return _name;
27   }
28
29   public void addEmployee(Employee empl) {
30     _empls.add(empl);
31   }
32
33   public List JavaDoc getEmployees() {
34     return _empls;
35   }
36 }
37
Popular Tags