~sword-devel/jsword/trunk

« back to all changes in this revision

Viewing changes to jsword/java/historic/org/crosswire/bible/control/test/TestList.java

  • Committer: joe
  • Date: 2002-10-08 21:36:18 UTC
  • Revision ID: svn-v4:a88caf3b-7e0a-0410-8d0d-cecb45342206:trunk:80
big config and comment update

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
package org.crosswire.bible.control.test;
3
 
 
4
 
import java.util.Enumeration;
5
 
import java.util.Hashtable;
6
 
 
7
 
/**
8
 
 * Old style Test.
9
 
 *
10
 
 * <table border='1' cellPadding='3' cellSpacing='0' width="100%">
11
 
 * <tr><td bgColor='white'class='TableRowColor'><font size='-7'>
12
 
 * Distribution Licence:<br />
13
 
 * Project B is free software; you can redistribute it
14
 
 * and/or modify it under the terms of the GNU General Public License,
15
 
 * version 2 as published by the Free Software Foundation.<br />
16
 
 * This program is distributed in the hope that it will be useful,
17
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19
 
 * General Public License for more details.<br />
20
 
 * The License is available on the internet
21
 
 * <a href='http://www.gnu.org/copyleft/gpl.html'>here</a>, by writing to
22
 
 * <i>Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
23
 
 * MA 02111-1307, USA</i>, Or locally at the Licence link below.<br />
24
 
 * The copyright to this program is held by it's authors.
25
 
 * </font></td></tr></table>
26
 
 * @see <a href='http://www.eireneh.com/servlets/Web'>Project B Home</a>
27
 
 * @see <{docs.Licence}>
28
 
 * @author Joe Walker
29
 
 */
30
 
public class TestList
31
 
{
32
 
    /**
33
 
     * Ensure that we are not initialized
34
 
     */
35
 
    private TestList()
36
 
    {
37
 
    }
38
 
 
39
 
    /**
40
 
     * Get a hash of available test sets and names for them
41
 
     * @return A test set hash
42
 
     */
43
 
    public static Hashtable getTesters()
44
 
    {
45
 
        if (hash == null)
46
 
        {
47
 
            hash = new Hashtable();
48
 
        }
49
 
 
50
 
        return hash;
51
 
    }
52
 
 
53
 
    /**
54
 
     * Get an array containing just the names of the tests
55
 
     * @return A list of test names
56
 
     */
57
 
    public static String[] getNames()
58
 
    {
59
 
        if (names == null)
60
 
        {
61
 
            if (hash == null)
62
 
                getTesters();
63
 
 
64
 
            names = new String[hash.size()];
65
 
            Enumeration en = hash.keys();
66
 
            int i = 0;
67
 
            while (en.hasMoreElements())
68
 
            {
69
 
                names[i++] = (String) en.nextElement();
70
 
            }
71
 
        }
72
 
 
73
 
        return names;
74
 
    }
75
 
 
76
 
    /** The hash of test sets */
77
 
    private static Hashtable hash;
78
 
 
79
 
    /** The array of test names */
80
 
    private static String[] names;
81
 
}