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