1 4 5 package com.sun.j2ee.blueprints.clientstate; 6 7 import java.util.*; 8 9 12 public class SampleBean implements java.io.Serializable { 13 14 private String nextPage; 15 private ArrayList words; 16 17 public SampleBean() { 18 words = new ArrayList(); 19 } 20 21 public void addWord(String word) { 22 words.add(word); 23 } 24 25 public void removeWord(String target) { 26 words.remove(target); 27 } 28 29 public void setNextPage(String nextPage) { 30 this.nextPage = nextPage; 31 } 32 33 public Iterator getWords() { 34 return words.iterator(); 35 } 36 37 public String toString() { 38 return "SampleBean { words=" + words + "}"; 39 } 40 41 } 42 | Popular Tags |