KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sf > uitags > testdata > Continent


1 /**
2  * Feb 23, 2005
3  *
4  * Copyright 2004 uitags
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */

18 package net.sf.uitags.testdata;
19
20 import java.util.ArrayList JavaDoc;
21 import java.util.List JavaDoc;
22
23 public class Continent {
24   private String JavaDoc id;
25   private String JavaDoc name;
26   private List JavaDoc countries;
27
28   public Continent(String JavaDoc id, String JavaDoc name) {
29     this.id = id;
30     this.name = name;
31     this.countries = new ArrayList JavaDoc();
32   }
33
34   public void setId(String JavaDoc value) { this.id = value; }
35   public String JavaDoc getId() { return this.id; }
36
37   public void setName(String JavaDoc value) { this.name = value; }
38   public String JavaDoc getName() { return this.name; }
39
40   public void addCountry(Country country) {
41     this.countries.add(country);
42     country.setContinent(this);
43   }
44   public List JavaDoc getCountries() { return this.countries; }
45 }
46
Popular Tags