KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > cache > tests > SamplePojo


1 /*
2 * JBoss, the OpenSource J2EE webOS
3 *
4 * Distributable under LGPL license.
5 * See terms of license at gnu.org.
6 */

7 package org.jboss.cache.tests;
8
9 import java.io.Serializable JavaDoc;
10 import java.util.List JavaDoc;
11 import java.util.ArrayList JavaDoc;
12
13 /**
14  * @author Bela Ban
15  * @version $Id: SamplePojo.java,v 1.1.2.3 2005/04/06 21:07:05 starksm Exp $
16  */

17 public class SamplePojo implements Serializable JavaDoc {
18    int age;
19    String JavaDoc name;
20    List JavaDoc hobbies=new ArrayList JavaDoc();
21
22    public SamplePojo(int age, String JavaDoc name) {
23       this.age=age;
24       this.name=name;
25    }
26
27    public int getAge() {
28       return age;
29    }
30
31    public void setAge(int age) {
32       this.age=age;
33    }
34
35    public String JavaDoc getName() {
36       return name;
37    }
38
39    public void setName(String JavaDoc name) {
40       this.name=name;
41    }
42
43    public List JavaDoc getHobbies() {
44       return hobbies;
45    }
46
47    public void setHobbies(List JavaDoc hobbies) {
48       this.hobbies=hobbies;
49    }
50
51    public String JavaDoc toString() {
52       return "name=" + name + ", age=" + age + ", hobbies=" + hobbies;
53    }
54 }
55
Popular Tags