Package java.util

Examples of java.util.TreeMap$AscendingSubMapEntryIterator


            // Now information attached to the predecessor.
            if (existanceIndicators[j] == null)
            { // The predecessor does not yet have identified
              // successor
              // which depend on an existnace indicator.
              existanceIndicators[j] = new TreeMap();
              existanceIndicators[j].put(
                  dependenceOnPredecessor[0],
                  dependenceOnPredecessor[1]);
            } // then (existanceIndicators[j]==null)
            else
View Full Code Here


          throw new XException(Constants.LOCATION_INTERN,
              Constants.LAYER_PROTOCOL,
              Constants.PACKAGE_PROTOCOL_RECORDS, "23");
        }
        // Now the single fields in the record type
        TreeMap existanceIndicators = null;
        // With the found position in the checkInfos array
        // the correct existance indicator map is retrieved ...
        if (checkInfos[1] != null)
          // Because pos was augmented once to much in the for loop,
          // now
View Full Code Here

          // its
          // predecessor itself.
          if (CardinalityStrings
              .getCardinalityHigh(occurrences, true) > 1)
          {
            existanceIndicators[pos] = new TreeMap();
            existanceIndicators[pos].put(precedingIndicator[0],
                precedingIndicator[1]);
          } // if (getCardinalityHigh(occurrences,true)>1)
        } // if (!recIdentMethod.equals("TypeIdentifier") &&
        // isCardinalityInterval(occurrences,true))
View Full Code Here

    * Copy a map<String, ClientProperty> to a map<String, String>.
    * @param clp The xmlBlaster ClientProperties
    * @return The simple string map
    */
   protected Map clientPropertiesToMap(Map clp) {
      Map attrMap = new TreeMap();
      Iterator it = clp.keySet().iterator();
      while (it.hasNext()) {
         String key = (String)it.next();
         ClientProperty prop = (ClientProperty)clp.get(key);
         attrMap.put(key, prop.getStringValue());
      }
      return attrMap;
   }
View Full Code Here

         String name = /*cols[i].getCatalog() + "." +*/ cols[i].getSchema() + "." + cols[i].getTable() + "." + cols[i].getColName();
         map2.put(name, cols[i]);
      }
     
      // scan map1
      Map ret = new TreeMap();
      String[] keys = (String[])map1.keySet().toArray(new String[map1.size()]);
      for (int i=0; i < keys.length; i++) {
         SqlColumn[] val = new SqlColumn[2];
         SqlColumn val1 = (SqlColumn)map1.get(keys[i]);
         SqlColumn val2 = (SqlColumn)map2.remove(keys[i]);
         if (val2 == null) { // then the column has been deleted
            val[0] = val1;
            val[1] = null;
            ret.put(keys[i], val);
         }
         else { // check if it has changed
            if(!val1.isSame(val2)) {
               ret.put(keys[i], new SqlColumn[] { val1, val2 });
            }
         }
      }
      // and now scam map2 for still remaining (new) columns
      keys = (String[])map2.keySet().toArray(new String[map2.size()]);
      for (int i=0; i < keys.length; i++) {
         SqlColumn[] val = new SqlColumn[2];
         val[0] = null;
         val[1] = (SqlColumn)map2.get(keys[i]);
         ret.put(keys[i], val);
      }
      // and now build the output string ...
      StringBuffer buf = new StringBuffer(1024);
      buf.append("<descDiff>\n");
      Iterator iter = ret.keySet().iterator();
      while (iter.hasNext()) {
         String name = (String)iter.next();
         buf.append("\n\n\n  <!-- column ").append(name);  
         SqlColumn[] val = (SqlColumn[])ret.get(name);
         if (val[0] == null) { // new column
            buf.append("  NEW -->\n");
            buf.append(val[1].toXml("  "));
         }
         else if (val[1] == null) { // deleted column
View Full Code Here

   /**
    * Default constructor, you need to call <tt>init()<tt> thereafter.
    */
   public ReplManagerPlugin() {
      super(new String[] {});
      this.replications = new TreeMap();
      this.topicToPrefixMap = new HashMap();
      this.counterMap = new HashMap();
      this.replSlaveMap = new TreeMap();
      this.sqlStatementMap = new TreeMap();
      this.transformerCache = new VersionTransformerCache();
      this.initialDataTopicSet = new HashSet();
   }
View Full Code Here

    this(null);
  }
 
  public GenericMapper(String name) {
    this.name = name;
    map = new TreeMap(new NumberStringComparator());
    intervals = new Vector();
  }
View Full Code Here

      }
      this.glob = this.property.getGlobal();
     
      if (property.getMaxEntries() > Integer.MAX_VALUE) throw new XmlBlasterException(this.glob, ErrorCode.RESOURCE_CONFIGURATION_PLUGINFAILED, ME + ".initialize: The maximum number of messages is too big");
     
      this.storage = new TreeMap();
      this.lruSet = new TreeSet(new LruComparator());

      this.isShutdown = false;
   }
View Full Code Here

                mimes[ii].equals(mime) &&
                  (extended[ii].equals("*") || extended[ii].equals(mimeExtended))) {
               // Ok, found a plugin, add it to cache
               Map plugins = (Map)mimeCache.get(key);
               if (plugins == null) { // we need a multimap, sadly JDK does not offer it, so we use a map in the map.
                  plugins = new TreeMap();
                  mimeCache.put(key, plugins);
               }
               plugins.put(plugin.getName(), plugin);
               log.info("mime=" + mime + " mimeExtended=" + mimeExtended + " added to cache with plugin=" + plugin.getName());
               break;
View Full Code Here

      String prefix = fileName + sep;
      String expression = prefix + '*';
      File[] files = this.tmpDirectory.listFiles(new FilenameFilter(expression, false));

      if (files.length > 0) {
         TreeMap map = new TreeMap();
         for (int i=0; i < files.length; i++) {
            long postfix = extractNumberPostfixFromFile(files[i].getName(), prefix);
            if (postfix > -1L) {
               if (files[i].exists() && files[i].canRead() && files[i].isFile())
                  map.put(new Long(postfix), files[i]);
            }
         }
         File[] ret = new File[map.size()];
         Iterator iter = map.keySet().iterator();
         int i = 0;
         while (iter.hasNext()) {
            ret[i] = (File)map.get(iter.next());
            i++;
         }
         return ret;
      }
      return new File[0];
View Full Code Here

TOP

Related Classes of java.util.TreeMap$AscendingSubMapEntryIterator

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.