Package java.util

Examples of java.util.TreeMap.entrySet()


        resources.getString("system-properties-table.column.value"),};

    final Properties sysProps = System.getProperties();

    final TreeMap data = new TreeMap(sysProps);
    final Map.Entry[] entries = (Map.Entry[]) data.entrySet().toArray(new Map.Entry[data.size()]);
    final DefaultTableModel properties = new DefaultTableModel(names, entries.length);
    for (int i = 0; i < entries.length; i++)
    {
      final Map.Entry entry = entries[i];
      properties.setValueAt(entry.getKey(), i, 0);
View Full Code Here


      }
      printMetaBundle(data, globalAttributes);
    }
    System.out.println("-----------------------------------------------------");

    final Iterator iterator = globalAttributes.entrySet().iterator();
    while (iterator.hasNext())
    {
      final Map.Entry o = (Map.Entry) iterator.next();

      final AttributeMetaData attribute = (AttributeMetaData) o.getValue();
View Full Code Here

        TreeMap indexToTokenMap = new TreeMap();
        getTokenIndizes(buf, indexToDelimiterMap, indexToTokenMap, returnEmptyStrings);
        if (returnDelimiters)
            indexToTokenMap.putAll(indexToDelimiterMap);
        _indexToTokenEntries = new Vector();
        _indexToTokenEntries.addAll(indexToTokenMap.entrySet());
    }

    public boolean hasMoreTokens()
    {
        return _currentIndex < _indexToTokenEntries.size();
View Full Code Here

                    map.put(it.next(), key);
                }
            }

            // Now iterate created map and kill the first 15% plus one to account for zero
            Set setPairKeys = map.entrySet();
            int itemsToRemove = ((int) (map.size() * 0.15)) + 1;

            Iterator iter = setPairKeys.iterator();
            while (iter.hasNext() && itemsToRemove > 0) {
                Map.Entry entry = (Map.Entry) iter.next();
View Full Code Here

    TreeMap sorted = new TreeMap();
    while(it.hasNext()) {
      Map.Entry en = (Map.Entry)it.next();
      sorted.put(en.getKey(), en.getValue());
    }
    it = sorted.entrySet().iterator();
    while(it.hasNext()) {
      Map.Entry en = (Map.Entry)it.next();
      msg(en.getKey() + "=" + en.getValue());
    }
    msg("====");
View Full Code Here

                    map.put(it.next(), key);
                }
            }

            // Now iterate created map and kill the first 15% plus one to account for zero
            Set setPairKeys = map.entrySet();
            int itemsToRemove = ((int) (map.size() * 0.15)) + 1;

            Iterator iter = setPairKeys.iterator();
            while (iter.hasNext() && itemsToRemove > 0) {
                Map.Entry entry = (Map.Entry) iter.next();
View Full Code Here

    }

    private static URI createURI(Artifact artifact, Map name) {
        StringBuffer queryString = new StringBuffer();
        TreeMap treeMap = new TreeMap(name);
        for (Iterator iterator = treeMap.entrySet().iterator(); iterator.hasNext();) {
            Map.Entry entry = (Map.Entry) iterator.next();
            String key = (String) entry.getKey();
            String value = (String) entry.getValue();
            queryString.append(key).append('=').append(value);
            if (iterator.hasNext()) {
View Full Code Here

    }

    private static URI createURI(Artifact artifact, Map name, Set interfaceTypes) {
        StringBuffer queryString = new StringBuffer();
        TreeMap treeMap = new TreeMap(name);
        for (Iterator iterator = treeMap.entrySet().iterator(); iterator.hasNext();) {
            Map.Entry entry = (Map.Entry) iterator.next();
            String key = (String) entry.getKey();
            String value = (String) entry.getValue();
            queryString.append(key).append('=').append(value);
            if (iterator.hasNext()) {
View Full Code Here

        return info.getGBeanInfo().getClassName();
    }

    public SortedMap getAttributes() {
        TreeMap attributes = new TreeMap(info.getAttributes());
        for (Iterator iterator = attributes.entrySet().iterator(); iterator.hasNext();) {
            Map.Entry entry = (Map.Entry) iterator.next();
            if (entry.getValue() == null) {
                entry.setValue("(null)");
            }
            if (entry.getValue() instanceof Object[]) {
View Full Code Here

                        throw ex;
                    }
                }
            }
        }
        for (Iterator iter = result.entrySet().iterator(); iter.hasNext();)
        {
            Entry entry = (Entry) iter.next();
            String key = (String) entry.getKey();
            map.put(key.substring(key.indexOf("-")), entry.getValue());
        }
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.