Package java.util

Examples of java.util.TreeMap$SubMapEntryIterator


    *
    * @return the subset of properties found. The keys are stripped from their
    * prefix. The returned keys are returned in alphabetical order.
    */
   public  Map getPropertiesStartingWith(String prefix) {
      TreeMap map = new TreeMap();
      synchronized (this.properties) {
         Enumeration iter = this.properties.keys();
         while (iter.hasMoreElements()) {
            String key = ((String)iter.nextElement()).trim();
            if (prefix == null || key.startsWith(prefix)) {
               Object val = this.properties.get(key);
               if (prefix != null)
                  key = key.substring(prefix.length());
               map.put(key, val);
            }
         }
      }
      synchronized (this.propMap) {
         Iterator iter = this.propMap.entrySet().iterator();
         while (iter.hasNext()) {
            Map.Entry entry = ((Map.Entry)iter.next());
            String key = (String)entry.getKey();
            Object val = entry.getValue();
            if (prefix == null || key.startsWith(prefix)) {
               if (prefix != null)
                  key = key.substring(prefix.length());
               map.put(key, val);
            }
         }
      }

      return map;
View Full Code Here


         throw new XmlBlasterException(Global.instance(), ErrorCode.RESOURCE_CONFIGURATION, ME + ".scanArray", "Invalid array, closing ']' bracket before '[' for key='" + key + "'");
      String prefix = key.substring(0, posOpen);

      Map map = getMap_(prefix);
      if (map == null) {
         map = new TreeMap();
         /*String oldValue = (String)*/propMap.put(prefix, map);
      }

      String arg = key.substring(posOpen+1, posClose);

View Full Code Here

    *           weak reference.
    */
   public Timeout(String name, boolean useWeakReference) {
      super(name);
      this.useWeakReference = useWeakReference;
      this.map = new TreeMap();
      setDaemon(true);
      start();
      while (!ready) { // We block until our timer thread is ready
         try {
            Thread.sleep(1);
View Full Code Here

            { // loop over all record types in the role of a
              // preceding
              // record containg an existance indicator for a
              // suceeding
              // record type
              TreeMap existanceIndicators = ((TreeMap[]) checkInfos[1])[i];
              // the existance indicators from one specific record
              // type to others
              if (existanceIndicators != null)
              { // some existance indicators depending on fields
                // on
                // this record type
                // Look if all of them point to existing fields.
                Iterator it = existanceIndicators.values()
                    .iterator();
                while (it.hasNext())
                { // loop over all existance indicators for
                  // each
                  // record type
View Full Code Here

    Hashtable keys = (Hashtable) sections.get(section);

    if (keys != null)
    {
      return new TreeMap(keys);
    }
    else
    {
      return null;
    }
View Full Code Here

    Hashtable keys = (Hashtable) sections.get("Variable");

    if (keys != null)
    {
      variablesConf = new TreeMap(keys);
    }
    else
    {
      return null;
    }
View Full Code Here

     */
    protected Map handleGetAllMessages()
    {

        final boolean normalize = this.isNormalizeMessages();
        final Map messages = (normalize) ? (Map)new TreeMap() : (Map)new LinkedHashMap();

        // - only retrieve the messages for the entry use case (i.e. the use case
        //   where the application begins)
        if (this.isEntryUseCase())
        {
View Full Code Here

     * Populates the property descriptor table by merging the
     * lists of Property descriptors.
     */
    private void processPropertyDescriptors() {
  if (properties == null) {
      properties = new TreeMap();
  }

  List list;

  PropertyDescriptor pd, gpd, spd;
View Full Code Here

        while (i.hasNext()) {
            topNode.add(new DefaultMutableTreeNode((String) i.next()));
        }

        TreeMap plugins = PreferencesDialog.getPluginPanels();
        if (plugins.size() > 0) {
            pluginsNode = new DefaultMutableTreeNode(resources
                    .getString("pluginPreferences"));
            i = plugins.keySet().iterator();
            while (i.hasNext()) {
                pluginsNode.add(new DefaultMutableTreeNode((String) i.next()));
            }
            root.add(pluginsNode);
        }
View Full Code Here

                group = "zzz Contacts";
            } else if (group.equals(resources.getString("transportsGroup"))) {
                group = "zzzz Agents/Transports";
            }

            buddyGroups.put(group, new TreeMap());

            int count = 0;

            // find the index of the newly sorted group
            Iterator i = buddyGroups.keySet().iterator();
View Full Code Here

TOP

Related Classes of java.util.TreeMap$SubMapEntryIterator

Copyright © 2018 www.massapicom. 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.