01: /*
02: * @(#)Sample3.java
03: *
04: * Original author is Matt Albrecht
05: * groboclown@users.sourceforge.net
06: * http://groboutils.sourceforge.net
07: *
08: * This code sample has been submitted to the public domain, to show
09: * uses for the Interface testing framework.
10: *
11: * This program is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14: */
15:
16: package net.sourceforge.groboutils.junit.v1.iftc;
17:
18: /**
19: * Sample abstract class.
20: * <P>
21: * Formatted for 70-column publication.
22: *
23: * @author Matt Albrecht <a href="mailto:groboclown@users.sourceforge.net">groboclown@users.sourceforge.net</a>
24: * @since July 21, 2002
25: * @version $Date: 2002/07/28 22:43:58 $
26: */
27: public abstract class Sample3 implements Sample1 {
28: private java.util.Vector addedStrings = new java.util.Vector();
29:
30: protected Sample3() {
31: }
32:
33: public void addString(String s) {
34: if (s == null) {
35: throw new IllegalArgumentException("no null arguments");
36: }
37: this .addedStrings.addElement(s);
38: }
39:
40: public java.util.Enumeration getAddedStrings() {
41: return this.addedStrings.elements();
42: }
43: }
|