// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
public class Version {
    public final static int MAX_VERSIONS = 100;
    public final static int MAX_INFO_LEN = MAX_VERSIONS * 100;
    private int noVersions;
    private String[] module;
    private String[] version;
    private String[] date;
    private static Version instance= null;
    private Version() {
       noVersions = 0;
       module = new String[MAX_VERSIONS];
       version = new String[MAX_VERSIONS];
       date = new String[MAX_VERSIONS];
    }
    public static Version getInstance() {
        if(instance == null) {
            instance = new Version();
        }
        return instance;
    }
    public void add(String m, String v, String d) {
        module[noVersions] = m;
        version[noVersions] = v;
        date[noVersions] = d;
        noVersions++;
        return;
    }
    public int getNoVersions() {
        return noVersions;
    }
    public String getModule(int ix) {
        return module[ix];
    }
    public String getVersion(int ix) {
        return version[ix];
    }
    public String getDate(int ix) {
        return date[ix];
    }
}


