FileDocCategorySizeDatePackage
ClassScanner.javaAPI DocExample9867Mon Apr 06 18:10:20 BST 1998None

MultiStringMap

public class MultiStringMap extends Hashtable

Fields Summary
Constructors Summary
Methods Summary
public voidadd(java.lang.String key, java.lang.String value)

    if(!containsKey(key))
      put(key, new Vector());
    ((Vector)get(key)).addElement(value);
  
public java.util.VectorgetVector(java.lang.String key)

    if(!containsKey(key)) {
      System.err.println(
        "ERROR: can't find key: " + key);
      System.exit(1);
    }
    return (Vector)get(key);
  
public voidprintValues(java.io.PrintStream p)

    Enumeration k = keys();
    while(k.hasMoreElements()) {
      String oneKey = (String)k.nextElement();
      Vector val = getVector(oneKey);
      for(int i = 0; i < val.size(); i++)
        p.println((String)val.elementAt(i));
    }