KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > j2ee > blueprints > clientstate > SampleBean


1 /* Copyright 2004 Sun Microsystems, Inc. All rights reserved. You may not modify, use, reproduce, or distribute this software except in compliance with the terms of the License at:
2  http://adventurebuilder.dev.java.net/LICENSE.txt
3  $Id: SampleBean.java,v 1.1 2004/11/17 21:02:00 gmurray71 Exp $ */

4
5 package com.sun.j2ee.blueprints.clientstate;
6
7 import java.util.*;
8
9 /**
10  * This Bean Contains Data that is Cached.
11  */

12 public class SampleBean implements java.io.Serializable JavaDoc {
13     
14     private String JavaDoc nextPage;
15     private ArrayList words;
16
17     public SampleBean() {
18         words = new ArrayList();
19     }
20     
21     public void addWord(String JavaDoc word) {
22         words.add(word);
23     }
24
25     public void removeWord(String JavaDoc target) {
26         words.remove(target);
27     }
28
29     public void setNextPage(String JavaDoc nextPage) {
30         this.nextPage = nextPage;
31     }
32     
33     public Iterator getWords() {
34         return words.iterator();
35     }
36     
37     public String JavaDoc toString() {
38         return "SampleBean { words=" + words + "}";
39     }
40
41 }
42
Popular Tags