KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > test > connextra > util > TestVector


1 package test.connextra.util;
2
3 import java.util.Enumeration JavaDoc;
4 import java.util.Vector JavaDoc;
5
6 public class TestVector extends Vector JavaDoc {
7     public TestVector() {
8         super();
9     }
10
11     public TestVector(Object JavaDoc[] defaultValues) {
12         super();
13
14         for (int i = 0; i < defaultValues.length; i++) {
15             addElement(defaultValues[i]);
16         }
17     }
18
19     public TestVector(Object JavaDoc defaultValue) {
20         this(new Object JavaDoc[] {defaultValue});
21     }
22
23     public TestVector(Object JavaDoc defaultValue1, Object JavaDoc defaultValue2) {
24         this(new Object JavaDoc[] {defaultValue1, defaultValue2});
25     }
26
27     public TestVector(Object JavaDoc defaultValue1, Object JavaDoc defaultValue2, Object JavaDoc defaultValue3) {
28         this(new Object JavaDoc[] {defaultValue1, defaultValue2, defaultValue3});
29     }
30
31     public TestVector(Object JavaDoc defaultValue1, Object JavaDoc defaultValue2, Object JavaDoc defaultValue3, Object JavaDoc defaultValue4) {
32         this(new Object JavaDoc[] {defaultValue1, defaultValue2, defaultValue3, defaultValue4});
33     }
34
35     public TestVector(Object JavaDoc defaultValue1, Object JavaDoc defaultValue2, Object JavaDoc defaultValue3, Object JavaDoc defaultValue4, Object JavaDoc defaultValue5) {
36         this(new Object JavaDoc[] {defaultValue1, defaultValue2, defaultValue3, defaultValue4, defaultValue5});
37     }
38
39     public TestVector(Object JavaDoc defaultValue1, Object JavaDoc defaultValue2, Object JavaDoc defaultValue3, Object JavaDoc defaultValue4, Object JavaDoc defaultValue5, Object JavaDoc defaultValue6) {
40         this(new Object JavaDoc[] {defaultValue1, defaultValue2, defaultValue3, defaultValue4, defaultValue5, defaultValue6});
41     }
42
43     public TestVector(Object JavaDoc defaultValue1, Object JavaDoc defaultValue2, Object JavaDoc defaultValue3, Object JavaDoc defaultValue4, Object JavaDoc defaultValue5, Object JavaDoc defaultValue6,
44                       Object JavaDoc defaultValue7) {
45         this(new Object JavaDoc[] {defaultValue1, defaultValue2, defaultValue3, defaultValue4, defaultValue5, defaultValue6, defaultValue7});
46     }
47
48     public TestVector(Enumeration JavaDoc defaultValues) {
49         while (defaultValues.hasMoreElements()) {
50             addElement(defaultValues.nextElement());
51         }
52     }
53 }
Popular Tags