KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tctest > spring > bean > Recorder


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tctest.spring.bean;
5
6 import java.util.ArrayList JavaDoc;
7 import java.util.List JavaDoc;
8
9
10 public class Recorder {
11     
12     private List JavaDoc values = new ArrayList JavaDoc();
13
14     public void addValue(String JavaDoc value) {
15       synchronized(this) {
16         this.values.add(value);
17       }
18     }
19     
20     public List JavaDoc getValues() {
21       return values;
22     }
23
24     public String JavaDoc toString() {
25       return System.identityHashCode(this) + " Recorder: " + values;
26     }
27 }
28
29
Popular Tags