KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sourceforge > groboutils > junit > v1 > iftc > Sample3


1 /*
2  * @(#)Sample3.java
3  *
4  * Original author is Matt Albrecht
5  * groboclown@users.sourceforge.net
6  * http://groboutils.sourceforge.net
7  *
8  * This code sample has been submitted to the public domain, to show
9  * 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 /**
20  * Sample abstract class.
21  * <P>
22  * Formatted for 70-column publication.
23  *
24  * @author Matt Albrecht <a HREF="mailto:groboclown@users.sourceforge.net">groboclown@users.sourceforge.net</a>
25  * @since July 21, 2002
26  * @version $Date: 2002/07/28 22:43:58 $
27  */

28 public abstract class Sample3 implements Sample1 {
29     private java.util.Vector JavaDoc addedStrings = new java.util.Vector JavaDoc();
30     
31     protected Sample3() {}
32     
33     public void addString( String JavaDoc s ) {
34         if (s == null) {
35             throw new IllegalArgumentException JavaDoc("no null arguments");
36         }
37         this.addedStrings.addElement( s );
38     }
39     
40     
41     public java.util.Enumeration JavaDoc getAddedStrings() {
42         return this.addedStrings.elements();
43     }
44 }
45
46
Popular Tags