Package java.util

Examples of java.util.Dictionary.keys()


    }

    private static Integer getMaxSliderValue(JSlider slider) {
        Dictionary dictionary = slider.getLabelTable();
        if (dictionary != null) {
            Enumeration keys = dictionary.keys();
            int max = slider.getMinimum() - 1;
            while (keys.hasMoreElements()) {
                max = Math.max(max, ((Integer)keys.nextElement()).intValue());
            }
            if (max == slider.getMinimum() - 1) {
View Full Code Here


    }

    private static Integer getMinSliderValue(JSlider slider) {
        Dictionary dictionary = slider.getLabelTable();
        if (dictionary != null) {
            Enumeration keys = dictionary.keys();
            int min = slider.getMaximum() + 1;
            while (keys.hasMoreElements()) {
                min = Math.min(min, ((Integer)keys.nextElement()).intValue());
            }
            if (min == slider.getMaximum() + 1) {
View Full Code Here

  // bundle location and id
  protected void makeMatchProps() {
    matchProps = new Hashtable();
    Dictionary d = classLoader.bpkgs.bg.bundle.getHeaders();

    for(Enumeration e = d.keys(); e.hasMoreElements(); ) {
      Object key = e.nextElement();
      Object val = d.get(key);
      matchProps.put(key, val);
    }
View Full Code Here

      // Spacer for better layout (and separation of non-manifest data):
      appendRow(sb, "                                              ", "");

      List headerKeys = new ArrayList(headers.size());
      for(Enumeration e = headers.keys(); e.hasMoreElements(); ) {
        headerKeys.add(e.nextElement());
      }
      Collections.sort(headerKeys);
      for(Iterator it = headerKeys.iterator(); it.hasNext(); ) {
        String  key   = (String)it.next();
View Full Code Here

    for (int i = 0; i < b.length; i++) {
      if (b[i] != null) {
        out.println("Bundle: " + showBundle(b[i]));
        Dictionary d = (locale == null ? b[i].getHeaders()
                        : b[i].getHeaders(locale));
        for (Enumeration e = d.keys(); e.hasMoreElements();) {
          String key = (String) e.nextElement();
          out.println("  " + key + " = "
                      + Util.showObject(d.get(key)));
        }
        found = true;
View Full Code Here

    sb.append(b.getLocation() + ", id=" + b.getBundleId() + "\n");

    Dictionary headers = b.getHeaders();

    for(Enumeration e = headers.keys(); e.hasMoreElements(); ) {
      String key = (String)e.nextElement();
      String val = (String)headers.get(key);

      sb.append(key + ": " + val + "\n");
    }
View Full Code Here

    synchronized void doHttpReg()
    {
        Dictionary conf = httpConfig.getConfiguration();

        Hashtable props = new Hashtable();
        for (Enumeration e = conf.keys(); e.hasMoreElements();) {
            Object key = e.nextElement();
            Object val = conf.get(key);
            props.put(key, val);
        }
        // UPnP Ref impl need this
View Full Code Here

            System.err.println("No configuration is being edited. Run the edit command first");
        } else if (!bypassStorage && storage != null) {
          String pid = (String) this.session.get(PROPERTY_CONFIG_PID);
          File storageFile = new File(storage, pid + ".cfg");
            Properties p = new Properties(storageFile);
            for (Enumeration keys = props.keys(); keys.hasMoreElements();) {
                Object key = keys.nextElement();
                if (!"service.pid".equals(key) && !"felix.fileinstall.filename".equals(key)) {
                    p.put((String) key, (String) props.get(key));
                }
            }
View Full Code Here

        String title = Util.getBundleName(bundle);
        System.out.println("\n" + title);
        System.out.println(Util.getUnderlineString(title));
        if (indent == 0) {
            Dictionary dict = bundle.getHeaders();
            Enumeration keys = dict.keys();
            while (keys.hasMoreElements()) {
                Object k = keys.nextElement();
                Object v = dict.get(k);
                System.out.println(k + " = " + Util.getValueString(v));
            }
View Full Code Here

        Map<String, Object> otherAttribs = new HashMap<String, Object>();
        Map<String, Object> bundleAttribs = new HashMap<String, Object>();
        Map<String, Object> serviceAttribs = new HashMap<String, Object>();
        Map<String, Object> packagesAttribs = new HashMap<String, Object>();
        Dictionary dict = bundle.getHeaders();
        Enumeration keys = dict.keys();

        // do an initial loop and separate the attributes in different groups
        while (keys.hasMoreElements()) {
            String k = (String) keys.nextElement();
            Object v = dict.get(k);
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.