Package java.util

Examples of java.util.Hashtable.keySet()


      //      assertEquals(oldFieldMap.keySet(), newFieldMap.keySet());
      //      assertEquals(oldFieldMap.keySet(), newFieldMap.keySet());

      ArrayList oldFieldTags = new ArrayList(oldFieldMap.keySet());
      Collections.sort(oldFieldTags);
      ArrayList newFieldTags = new ArrayList(newFieldMap.keySet());
      Collections.sort(newFieldTags);
      assertEquals(oldFieldTags, newFieldTags);

      for (int j = 0; j < oldFieldTags.size(); j++)
      {
View Full Code Here


    }

    private List getIgnorableActions(MessageContext msgContext) {
        SOAPService soapService = msgContext.getService();
        Hashtable options = soapService.getOptions();
        Iterator ite = options.keySet().iterator();
        List actionList = new ArrayList();
        while (ite.hasNext()) {
            String key = (String) ite.next();

            if (key.regionMatches(0, Constants.IGNORE_ACTION, 0, Constants.IGNORE_ACTION.length()))
View Full Code Here

            int psrOffset = usr.getPersistPointersOffset();

            PersistPtrHolder ptr = (PersistPtrHolder)Record.buildRecordAtOffset(docstream, psrOffset);
            lst.add(new Integer(psrOffset));
            Hashtable entries = ptr.getSlideLocationsLookup();
            for (Iterator it = entries.keySet().iterator(); it.hasNext(); ) {
                Integer id = (Integer)it.next();
                Integer offset = (Integer)entries.get(id);

                lst.add(offset);
                offset2id.put(offset, id);
View Full Code Here

            int psrOffset = usr.getPersistPointersOffset();

            PersistPtrHolder ptr = (PersistPtrHolder)Record.buildRecordAtOffset(docstream, psrOffset);
            lst.add(new Integer(psrOffset));
            Hashtable entries = ptr.getSlideLocationsLookup();
            for (Iterator it = entries.keySet().iterator(); it.hasNext(); ) {
                Integer id = (Integer)it.next();
                Integer offset = (Integer)entries.get(id);

                lst.add(offset);
            }
View Full Code Here

                    byDir.put(parent, v);
                }
                v.addElement(thisLink);
            }
            // write a Properties file in each directory:
            for (Iterator dirs = byDir.keySet().iterator(); dirs.hasNext();) {
                File dir = (File) dirs.next();
                Vector linksInDir = (Vector) byDir.get(dir);
                Properties linksToStore = new Properties();

                // fill up a Properties object with link and resource names:
View Full Code Here

    Map map = new Hashtable(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.remove();
    Integer remove2 = (Integer) it.next();
    it.remove();
    ArrayList list = new ArrayList(Arrays.asList(new Integer[] {
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 Hashtable(101);
    map2.put(new Integer(1), "1");
    map2.put(new Integer(4), "4");
View Full Code Here

        list.get(0)));

    Map map2 = new Hashtable(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.Hashtable#keySet()
View Full Code Here

          ht.remove(String.valueOf(i));
        }
      }
    };
    t1.start();
    Set set = ht.keySet();
    for (int i = 0; i < iterations; i++) {
      Iterator it = set.iterator();
      try {
        it.next();
        it.remove();
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.