Package java.util

Examples of java.util.TreeMap.containsKey()


            List fcsl = new ArrayList(fcs.getColumnCount());
            while (fcs.parseRow(fcsl)) {
                String featureclass = ((String) fcsl.get(featureClassColumn)).toLowerCase();
                String table1 = ((String) fcsl.get(table1Column)).toLowerCase();
                if (!ftypeinfo.containsKey(featureclass)) {
                    ftypeinfo.put(featureclass, null);
                    String type = null;
                    if (table1.endsWith(".cft")) {
                        type = "complex feature";
                    } else if (table1.endsWith(".pft")) {
View Full Code Here


    checkHits(resultSort, "Sort by custom criteria: "); // check for duplicates
   
        // besides the sorting both sets of hits must be identical
        for(int hitid=0;hitid<resultSort.length; ++hitid) {
            Integer idHitDate = Integer.valueOf(resultSort[hitid].doc); // 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 = Integer.valueOf(resultSort[hitid].doc); // 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;

                luceneId = Integer.valueOf(hits[docnum].doc);
                if(idMap.containsKey(luceneId)) {
                    StringBuilder message = new StringBuilder(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

  }

  public String toString() {
    Map<Integer, List<Integer>> map = new TreeMap();
    for (int n = 0; n < parent.length; n++) {
      if (!map.containsKey(find(n))) map.put(find(n), new ArrayList());
      map.get(find(n)).add(n);
    }
    StringBuilder s = new StringBuilder();
    for (int each: map.keySet()) {
      s.append(map.get(each));
View Full Code Here

    while (i.hasNext())
    {
      ObjectInstance instance = (ObjectInstance)i.next();
      ObjectName name = instance.getObjectName();
      String domain = name.getDomain();
      if (domains.containsKey(domain))
      {
        ((Set)domains.get(domain)).add(name);
      }
      else
      {
View Full Code Here

                }

                for ( Iterator it = parentDepMgmt.getDependencies().iterator(); it.hasNext(); )
                {
                    Dependency dep = (Dependency) it.next();
                    if ( !mappedChildDeps.containsKey( dep.getManagementKey() ) )
                    {
                        childDepMgmt.addDependency( dep );
                    }
                }
            }
View Full Code Here

        Map svcModules = new TreeMap();
        Collection svcModuleMBeans = getAbstractNames(SERVICEMODULE_KEY + '=');
        for (Iterator it = svcModuleMBeans.iterator(); it.hasNext();) {
            AbstractName aname = (AbstractName) it.next();
            String svcModule = aname.getNameProperty(SERVICEMODULE_KEY);
            if (!svcModules.containsKey(svcModule)) {
                svcModules.put(svcModule, null);
            }
        }

        return svcModules.keySet();
View Full Code Here

                            for ( Iterator it = depMgmt.getDependencies().iterator(); it.hasNext(); )
                            {
                                Dependency includedDep = (Dependency) it.next();
                                String key = includedDep.getManagementKey();
                                if (!newDeps.containsKey(key))
                                {
                                    newDeps.put( includedDep.getManagementKey(), includedDep );
                                }
                            }
                            newDeps.remove(dep.getManagementKey());
View Full Code Here

                            for ( Iterator it = depMgmt.getDependencies().iterator(); it.hasNext(); )
                            {
                                Dependency includedDep = (Dependency) it.next();
                                String key = includedDep.getManagementKey();
                                if (!newDeps.containsKey(key))
                                {
                                    newDeps.put( includedDep.getManagementKey(), includedDep );
                                }
                            }
                            newDeps.remove(dep.getManagementKey());
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.