Package java.util

Examples of java.util.TreeMap.containsKey()


                }
                if (!products.containsKey(productId)) {
                    products.put(productId, new TreeMap());
                }
                TreeMap productMap = (TreeMap)products.get(productId);
                if (!productMap.containsKey(estimatedShipDate)) {
                    productMap.put(estimatedShipDate, UtilMisc.toMap("remainingQty", BigDecimal.ZERO, "reservations", FastList.newInstance()));
                }
                Map dateMap = (Map)productMap.get(estimatedShipDate);
                BigDecimal remainingQty = (BigDecimal)dateMap.get("remainingQty");
                //List reservations = (List)dateMap.get("reservations");
View Full Code Here


            for ( Iterator it = childPlugins.values().iterator(); it.hasNext(); )
            {
                ReportPlugin childPlugin = (ReportPlugin) it.next();

                if ( !assembledPlugins.containsKey( childPlugin.getKey() ) )
                {
                    assembledPlugins.put( childPlugin.getKey(), childPlugin );
                }
            }
View Full Code Here

            {
                Map.Entry entry = (Map.Entry) it.next();

                String id = (String) entry.getKey();

                if ( !assembledReportSets.containsKey( id ) )
                {
                    assembledReportSets.put( id, entry.getValue() );
                }
            }
View Full Code Here

                }
                if (!products.containsKey(productId)) {
                    products.put(productId, new TreeMap());
                }
                TreeMap productMap = (TreeMap)products.get(productId);
                if (!productMap.containsKey(estimatedShipDate)) {
                    productMap.put(estimatedShipDate, UtilMisc.toMap("remainingQty", new Double(0.0), "reservations", FastList.newInstance()));
                }
                Map dateMap = (Map)productMap.get(estimatedShipDate);
                Double remainingQty = (Double)dateMap.get("remainingQty");
                //List reservations = (List)dateMap.get("reservations");
View Full Code Here

                }
                if (!products.containsKey(productId)) {
                    products.put(productId, new TreeMap());
                }
                TreeMap productMap = (TreeMap)products.get(productId);
                if (!productMap.containsKey(estimatedShipDate)) {
                    productMap.put(estimatedShipDate, UtilMisc.toMap("remainingQty", new Double(0.0), "reservations", FastList.newInstance()));
                }
                Map dateMap = (Map)productMap.get(estimatedShipDate);
                Double remainingQty = (Double)dateMap.get("remainingQty");
                //List reservations = (List)dateMap.get("reservations");
View Full Code Here

   
        String lf = System.getProperty("line.separator", "\n");
        // besides the sorting both sets of hits must be identical
        for(int hitid=0;hitid<resultSort.length(); ++hitid) {
            Integer idHitDate = new Integer(resultSort.id(hitid)); // document ID from sorted search
            if(!resultMap.containsKey(idHitDate)) {
                log("ID "+idHitDate+" not found. Possibliy a duplicate.");
            }
            assertTrue(resultMap.containsKey(idHitDate)); // same ID must be in the Map from the rank-sorted search
            // every hit must appear once in both result sets --> remove it from the Map.
            // At the end the Map must be empty!
View Full Code Here

        for(int hitid=0;hitid<resultSort.length(); ++hitid) {
            Integer idHitDate = new Integer(resultSort.id(hitid)); // document ID from sorted search
            if(!resultMap.containsKey(idHitDate)) {
                log("ID "+idHitDate+" not found. Possibliy a duplicate.");
            }
            assertTrue(resultMap.containsKey(idHitDate)); // same ID must be in the Map from the rank-sorted search
            // every hit must appear once in both result sets --> remove it from the Map.
            // At the end the Map must be empty!
            resultMap.remove(idHitDate);
        }
        if(resultMap.size()==0) {
View Full Code Here

            Map idMap = new TreeMap();
            for(int docnum=0;docnum<hits.length();++docnum) {
                Integer luceneId = null;
                try {
                    luceneId = new Integer(hits.id(docnum));
                    if(idMap.containsKey(luceneId)) {
                        StringBuffer message = new StringBuffer(prefix);
                        message.append("Duplicate key for hit index = ");
                        message.append(docnum);
                        message.append(", previous index = ");
                        message.append(((Integer)idMap.get(luceneId)).toString());
View Full Code Here

          for (int i = 0; i < ses.length; i++) {
              ComponentInfo info = new ComponentInfo();
              info.name =  getAttribute(ses[i], "name");
              info.type =  "Service Engine";
              info.state =  getAttribute(ses[i], "currentState");
              if (components.containsKey(info.name)) {
                ((ComponentInfo) components.get(info.name)).type = "Unknown";
              } else {
                components.put(info.name, info);
              }
          }
View Full Code Here

        } while (targets.hasNext());

        for (Iterator ds = danglers.iterator(); ds.hasNext();) {
            baseAccess.checkCancelled();
            File file = (File) ds.next();
            if (!commitables.containsKey(file)) {
                SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.ILLEGAL_TARGET,
                        "''{0}'' is not under version control\n"
                        + "and is not part of the commit, \n"
                        + "yet its child is part of the commit", file);
                SVNErrorManager.error(err, SVNLogType.WC);
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.