Package java.util

Examples of java.util.Hashtable.elements()


  public void test_clear() {
    // Test for method void java.util.Hashtable.clear()
    Hashtable h = hashtableClone(htfull);
    h.clear();
    assertEquals("Hashtable was not cleared", 0, h.size());
    Enumeration el = h.elements();
    Enumeration keys = h.keys();
    assertTrue("Hashtable improperly cleared", !el.hasMoreElements()
        && !(keys.hasMoreElements()));
  }
View Full Code Here


    ht.put("9", "c");
    ht.put("12", "d");
    // Hashtable looks like:
    // 0: "1"
    // 1: "12" -> "9" -> "2"
    Enumeration en = ht.elements();
    // cache the first entry
    en.hasMoreElements();
    ht.remove("12");
    ht.remove("9");
    boolean exception = false;
View Full Code Here

    ht.put("9", "c");
    ht.put("12", "d");
    // Hashtable looks like:
    // 0: "1"
    // 1: "12" -> "9" -> "2"
    Enumeration en = ht.elements();
    // cache the first entry
    en.hasMoreElements();
    Iterator it = ht.keySet().iterator();
    // this is mostly a copy of the test in test_elements_subtest0()
    // test removing with the iterator does not null the values
View Full Code Here

        this.tagFiles = new TagFileInfo[tagFileVector.size()];
        tagFileVector.copyInto(this.tagFiles);

        this.functions = new FunctionInfo[functionTable.size()];
        int i = 0;
        Enumeration enumeration = functionTable.elements();
        while (enumeration.hasMoreElements()) {
            this.functions[i++] = (FunctionInfo) enumeration.nextElement();
        }
    }
View Full Code Here

        this.tagFiles = new TagFileInfo[tagFileVector.size()];
        tagFileVector.copyInto(this.tagFiles);

        this.functions = new FunctionInfo[functionTable.size()];
        int i = 0;
        Enumeration enumeration = functionTable.elements();
        while (enumeration.hasMoreElements()) {
            this.functions[i++] = (FunctionInfo) enumeration.nextElement();
        }
    }
View Full Code Here

        Container container = helpFrame.getContentPane();
        JTextArea helpText = new JTextArea();

        int classCnt = 0;
        Hashtable  clTable= new Hashtable();
        Enumeration enumer = clTable.elements();
        TreeSet  sortedClasses =  new TreeSet();
        while(enumer.hasMoreElements())
    {
        Object next = (Object)enumer.nextElement();
        Class currentClass = (Class)next;
View Full Code Here

        Container container = helpFrame.getContentPane();
        JTextArea helpText = new JTextArea();

        int classCnt = 0;
        Hashtable  clTable= new Hashtable();
        Enumeration enumer = clTable.elements();
        TreeSet  sortedClasses =  new TreeSet();
        while(enumer.hasMoreElements())
    {
            Object next = (Object)enumer.nextElement();
            Class currentClass = (Class)next;
View Full Code Here

        Container container = helpFrame.getContentPane();
        JTextArea helpText = new JTextArea();

        int classCnt = 0;
        Hashtable  clTable= new Hashtable()//// SOs-StergscalaExec.Interpreter.GlobalValues.functionManager.getClassLoader().loadedClasses;
        Enumeration enumer = clTable.elements();
        TreeSet  sortedClasses =  new TreeSet();
        while(enumer.hasMoreElements())
    {
        Object next = (Object)enumer.nextElement();
        Class currentClass = (Class)next;
View Full Code Here

   * and collect addresses and chain exceptions.
   */
  MessagingException chainedEx = null;
  boolean sendFailed = false;

  Enumeration e = protocols.elements();
  while (e.hasMoreElements()) {
      Vector v = (Vector)e.nextElement();
      Address[] protaddresses = new Address[v.size()];
      v.copyInto(protaddresses);

View Full Code Here

    permClass = (Class) gfields.get("permClass", null);

    if (permClass == null)
    {
      Enumeration e = permissions.elements();
      if (e.hasMoreElements())
      {
        AbstractPermission p = (AbstractPermission) e.nextElement();
        permClass = p.getClass();
      }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.