Code example for Hashtable

0
  /** 
   * Constructor 
   */ 
  public AndroidElementsHash() { 
    counter = 0;
    elements = new Hashtable<String, AndroidElement>();
  } 
 
  /** 
   * @param element 
   * @return 
   */ 
  public AndroidElement addElement(final UiObject element) {
    counter++;
    final String key = counter.toString();
    final AndroidElement el = new AndroidElement(key, element);
    elements.put(key, el);
    return el;
  } 
 
  /**