Package java.util

Examples of java.util.LinkedHashMap.keySet()


          .contains(objArray[i].toString()));

    LinkedHashMap m = new LinkedHashMap();
    m.put(null, "test");
    assertTrue("Failed with null key", m.keySet().contains(null));
    assertNull("Failed with null key", m.keySet().iterator().next());

    Map map = new LinkedHashMap(101);
    map.put(new Integer(1), "1");
    map.put(new Integer(102), "102");
    map.put(new Integer(203), "203");
View Full Code Here


    Map map = new LinkedHashMap(101);
    map.put(new Integer(1), "1");
    map.put(new Integer(102), "102");
    map.put(new Integer(203), "203");
    Iterator it = map.keySet().iterator();
    Integer remove1 = (Integer) it.next();
    it.hasNext();
    it.remove();
    Integer remove2 = (Integer) it.next();
    it.remove();
View Full Code Here

        new Integer(1), new Integer(102), new Integer(203) }));
    list.remove(remove1);
    list.remove(remove2);
    assertTrue("Wrong result", it.next().equals(list.get(0)));
    assertEquals("Wrong size", 1, map.size());
    assertTrue("Wrong contents", map.keySet().iterator().next().equals(
        list.get(0)));

    Map map2 = new LinkedHashMap(101);
    map2.put(new Integer(1), "1");
    map2.put(new Integer(4), "4");
View Full Code Here

        list.get(0)));

    Map map2 = new LinkedHashMap(101);
    map2.put(new Integer(1), "1");
    map2.put(new Integer(4), "4");
    Iterator it2 = map2.keySet().iterator();
    Integer remove3 = (Integer) it2.next();
    Integer next;
    if (remove3.intValue() == 1)
      next = new Integer(4);
    else
View Full Code Here

      next = new Integer(1);
    it2.hasNext();
    it2.remove();
    assertTrue("Wrong result 2", it2.next().equals(next));
    assertEquals("Wrong size 2", 1, map2.size());
    assertTrue("Wrong contents 2", map2.keySet().iterator().next().equals(
        next));
  }

  /**
   * @tests java.util.LinkedHashMap#values()
View Full Code Here

          .get(objArray2[counter]) == hm2.get(objArray2[counter]));

    LinkedHashMap map = new LinkedHashMap();
    map.put("key", "value");
    // get the keySet() and values() on the original Map
    Set keys = map.keySet();
    Collection values = map.values();
    assertEquals("values() does not work",
        "value", values.iterator().next());
    assertEquals("keySet() does not work",
        "key", keys.iterator().next());
View Full Code Here

      }
     
      if( newTuple || i == xQueryResults.length - 1 )
      {
        tupleMaps.add( nameToValue );
        columnNames.addAll( nameToValue.keySet() );
        nameToValue = new LinkedHashMap();
      }
    }
   
    final String[] attributeNames = (String[])columnNames.toArray( new String[ columnNames.size() ] ) ;
View Full Code Here

                FeatureUtils.sortFeatureList(featureList);
            }

            pw.println("Chr\tStart\tEnd\t\tnucCount (Kwal)");
            // Loop through chromosomes
            for (String chr : featureMap.keySet()) {
                List<BlastMapping> mappingList = featureMap.get(chr);
                List<BasicScore> scores = new ArrayList(mappingList.size());

                for (BlastMapping mapping : mappingList) {
                    BlastMapping.Block queryBlock = mapping.getQueryBlock();
View Full Code Here

                        key = mapKey;
                    } else {
                        key = applicationContext.getBean(mapKeyRef);
                    }
                    Map referenceMap = new LinkedHashMap(sourceMap);
                    for (Object sourceKey : referenceMap.keySet()) {
                        if (sourceKey.equals(key)) {
                            sourceMap.remove(key);
                        }
                    }
                } catch (Exception e) {
View Full Code Here

  CaseLabel defaultLabel = new CaseLabel(this);
  int numberOfHashcodes = hashcodesToLambdas.size();
  CaseLabel[] switchLabels = new CaseLabel[numberOfHashcodes];
  int[] keys = new int[numberOfHashcodes];
  int[] sortedIndexes = new int[numberOfHashcodes];
  Set hashcodes = hashcodesToLambdas.keySet();
  Iterator hashcodeIterator = hashcodes.iterator();
  int index=0;
  while (hashcodeIterator.hasNext()) {
    Integer hashcode = (Integer)hashcodeIterator.next();
    switchLabels[index] = new CaseLabel(this);
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.