01: /*
02: * ImportTest.java --
03: *
04: * This class is used to regression test the java::import command.
05: *
06: * Copyright (c) 1999 by Moses DeJong
07: *
08: * See the file "license.terms" for information on usage and redistribution
09: * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
10: *
11: * RCS: @(#) $Id: ImportTest.java,v 1.2 2006/04/13 07:36:51 mdejong Exp $
12: *
13: */
14:
15: package tests;
16:
17: import java.util.*;
18:
19: public class ImportTest {
20: private String type;
21:
22: // constructors
23:
24: public ImportTest() {
25: type = "None";
26: }
27:
28: public ImportTest(Hashtable h) {
29: type = "Hashtable";
30: }
31:
32: public ImportTest(Vector v) {
33: type = "Vector";
34: }
35:
36: // getType() is used to determine which constructor was called
37:
38: public String getType() {
39: return type;
40: }
41:
42: // instance methods
43:
44: public String call(Hashtable h) {
45: return "Hashtable";
46: }
47:
48: public String call(Vector v) {
49: return "Vector";
50: }
51:
52: // static methods
53:
54: public static String scall(Hashtable h) {
55: return "Hashtable";
56: }
57:
58: public static String scall(Vector v) {
59: return "Vector";
60: }
61:
62: // static class member
63:
64: public final static int ten = 10;
65:
66: }
|