Package java.util

Examples of java.util.Hashtable.keySet()


    Hashtable m=jlh.scene.getNamedObjects();
    if(m!=null && m.size()>0){
      // TODO map these objects into corresponding ActiveNode
      // or do it for all the branchgroup sub nodes
      System.out.println("Scene contains :");
      Iterator it=m.keySet().iterator();
      while(it.hasNext()){
        Object v=it.next();
        System.out.println(v+"<=>"+m.get(v));
      }
    } 
View Full Code Here


         System.out.println(key.getClientTags());
      }
      {
         MsgKeyData md = new MsgKeyData(new Global(args));
         Hashtable map = md.toJXPath();
         Iterator it = map.keySet().iterator();
         while (it.hasNext()) {
            String key = (String)it.next();
            System.out.println(key + " -> '" + map.get(key) + "'");
         }
      }
View Full Code Here

    if (sections == null)
    {
      return null;
    } // if (sections == null)

    TreeSet sectionSet = new TreeSet(sections.keySet());
    return new Vector(sectionSet);
  } // getSections(String chapter)

  /**
   * Returns a map of all keys and their values for the given chapter and
View Full Code Here

                }
                if (allText == null) {
                    Hashtable buddyStatuses = BuddyList.getInstance()
                            .getBuddyStatuses();
                    if (buddyStatuses != null) {
                        Iterator iterator = buddyStatuses.keySet().iterator();
                        while (iterator.hasNext()) {
                            String user2 = (String) iterator.next();
                            BuddyStatus buddy2 = (BuddyStatus) buddyStatuses.get(user2);
                            if (buddy2.equals(buddy) == false
                                     && buddy2.getConversation() != null
View Full Code Here

      try
      {
         // Obtain the environment naming context.
         Context initCtx = new InitialContext();
         Hashtable env = initCtx.getEnvironment();
         Iterator keys = env.keySet().iterator();
         log.info("InitialContext.env:");
         while( keys.hasNext() )
         {
            Object key = keys.next();
            log.info("Key: "+key+", value: "+env.get(key));
View Full Code Here

        Hashtable newDirectoryMap = makeDirectoryMap(newDirectories);

        assertEquals(oldDirectories.size(), oldDirectoryMap.keySet().size());
        ArrayList oldDirectoryTypes = new ArrayList(oldDirectoryMap.keySet());
        Collections.sort(oldDirectoryTypes);
        ArrayList newDirectoryTypes = new ArrayList(newDirectoryMap.keySet());
        Collections.sort(newDirectoryTypes);
        assertEquals(oldDirectoryTypes, newDirectoryTypes);

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

            Hashtable oldFieldMap = makeFieldMap(oldItems);
            Hashtable newFieldMap = makeFieldMap(newItems);

            Set missingInNew = new HashSet(oldFieldMap.keySet());
            missingInNew.removeAll(newFieldMap.keySet());

            Set missingInOld = new HashSet(newFieldMap.keySet());
            missingInOld.removeAll(oldFieldMap.keySet());

            //            dump("missingInNew", missingInNew);
View Full Code Here

            Hashtable newFieldMap = makeFieldMap(newItems);

            Set missingInNew = new HashSet(oldFieldMap.keySet());
            missingInNew.removeAll(newFieldMap.keySet());

            Set missingInOld = new HashSet(newFieldMap.keySet());
            missingInOld.removeAll(oldFieldMap.keySet());

            //            dump("missingInNew", missingInNew);
            //            dump("missingInOld", missingInOld);
            //            dump("newFieldMap.keySet()", newFieldMap.keySet());
View Full Code Here

            //            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

        Map expectedFieldValues = new Hashtable();
        expectedFieldValues.put(new Integer(EXIF_TAG_MAKE.tag), "Canon");
        expectedFieldValues.put(new Integer(EXIF_TAG_MODEL.tag), "Canon PowerShot SD750");
        expectedFieldValues.put(new Integer(EXIF_TAG_MODIFY_DATE.tag), "2007:12:25 13:34:39");
        Iterator expectedTags = expectedFieldValues.keySet().iterator();
        while (expectedTags.hasNext()) {
            Integer tag = (Integer) expectedTags.next();
            Object expectedValue = expectedFieldValues.get(tag);

            assertTrue(fieldMap.containsKey(tag));
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.