Package java.util

Examples of java.util.Hashtable.keys()


  Hashtable h = (Hashtable)propNames.get(key);

  if(h != null && h.size() > 0) {
      String names[] = new String[h.size()];
      int count = 0;
      for (Enumeration e = h.keys(); e.hasMoreElements(); ) {
    CaselessStringKey str = (CaselessStringKey)e.nextElement();
    names[count++] = str.getName();
      }       
     
      return count > 0 ? names : null;
View Full Code Here


        //      System.err.println(tempToolBar.getLayout());
        //      tempToolBar.setLayout(new FlowLayout());
        int z = 2;

        if (toolBarType == wrapper_toolset) {
          Enumeration enm = hpps.keys();

          while (enm.hasMoreElements()) {
            String root = (String) enm.nextElement();
            String userPrefix = "";
            hpp = (HierarchyPropertyParser) hpps.get(root);
View Full Code Here

            Hashtable props = new Hashtable();
            props.put("key0", "value0");
            props.put("key1", "${value1}");
            props.put("key2", "${value2}");

            for (Enumeration e = props.keys(); e.hasMoreElements();)
            {
                String name = (String) e.nextElement();
                props.put(name, InterpolationHelper.substVars((String) props.get(name), name, null, props, context));
            }
View Full Code Here

            props.put("key0", "value0");
            props.put("key1", "${value1}");
            props.put("key2", "${value2}");
            props.put("key3", "${value3}");

            for (Enumeration e = props.keys(); e.hasMoreElements();)
            {
                String name = (String) e.nextElement();
                props.put(name,
                        InterpolationHelper.substVars((String) props.get(name), name, null, props, context));
            }
View Full Code Here

                    String.class);
            out.printin("out.write(\"<\"");
            out.print(" + " + elemName);

            // Write remaining attributes
            Enumeration enumeration = map.keys();
            while (enumeration.hasMoreElements()) {
                String attrName = (String) enumeration.nextElement();
                out.print((String) map.get(attrName));
            }
View Full Code Here

        Hashtable attlist = getElementAttributes(elname);

        if (attlist == null) {
            return null;
        } else {
            return attlist.keys();
        }
    }

    /**
     * Retrieve the declared type of an attribute.
View Full Code Here

        }

        // -- Restore the transient RenderingHints object. --

        // Get an enumeration of the table keys.
        Enumeration keys = table.keys();

        // Loop over the table keys.
        while (keys.hasMoreElements()) {
            // Get the next key element.
            SerializableState keyElement = (SerializableState)keys.nextElement();
View Full Code Here

        }

        // -- Restore the transient RenderingHints object. --

        // Get an enumeration of the table keys.
        Enumeration keys = table.keys();

        // Loop over the table keys.
        while(keys.hasMoreElements()) {
            // Get the next key element.
            HintElement keyElement = (HintElement)keys.nextElement();
View Full Code Here

        }

        // Remove non-serializable elements from table of properties.
        Hashtable propertyTable = properties;
        boolean propertiesCloned = false;
        Enumeration keys = propertyTable.keys();
        while(keys.hasMoreElements()) {
            Object key = keys.nextElement();
            if (!(properties.get(key) instanceof Serializable)) {
                if (!propertiesCloned) {
                    propertyTable = (Hashtable)properties.clone();
View Full Code Here

            if(log.isInfoEnabled()) log.info("election results: " + votes);


        // determine who got the most votes
        most_votes=0;
        for(Enumeration e=votes.keys(); e.hasMoreElements();) {
            tmp=(Address)e.nextElement();
            count=((Integer)votes.get(tmp)).intValue();
            if(count > most_votes) {
                winner=tmp;
// fixed July 15 2003 (patch submitted by Darren Hobbs, patch-id=771418)
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.