Package java.util

Examples of java.util.HashMap.entrySet()


            System.arraycopy(managedFieldSigs, 0, annotatedFieldSigs, 0, i);
            System.arraycopy(managedFieldMods, 0, annotatedFieldMods, 0, i);
            System.arraycopy(managedFieldFlags, 0, annotatedFieldFlags, 0, i);

            // append the annotated, non-managed fields
            for (Iterator k = annotatedFieldMap.entrySet().iterator();
                 k.hasNext();) {
                final Map.Entry entry = (Map.Entry)k.next();
                final String name = (String)entry.getKey();
                final ClassField field = (ClassField)entry.getValue();
                affirm(name.equals(field.name().asString()));
View Full Code Here


        }
        xmlObject = xmlObject.copy();
        cursor = xmlObject.newCursor();
        cursor.toNextToken();
        try {
            for (Object o : ns.entrySet()) {
                Map.Entry entry = (Map.Entry) o;
                cursor.insertNamespace((String) entry.getKey(), (String) entry.getValue());
            }
        } finally {
            cursor.dispose();
View Full Code Here

            addrs.add(address);
        }

        message.saveChanges();

        for (Iterator i = msgsByTransport.entrySet().iterator(); i.hasNext();) {
            Map.Entry entry = (Map.Entry) i.next();
            Transport transport = (Transport) entry.getKey();
            List addrs = (List) entry.getValue();
            transport.sendMessage(message, (Address[]) addrs.toArray(new Address[addrs.size()]));
        }
View Full Code Here

                MBeanGBeanBridge mbeanGBeanBridge = new MBeanGBeanBridge(kernel, objectName, mbeanInfo);
                registry.put(objectName, mbeanGBeanBridge);
                beans.put(objectName, mbeanGBeanBridge);
            }
        }
        for (Iterator iterator = beans.entrySet().iterator(); iterator.hasNext();) {
            Map.Entry entry = (Map.Entry) iterator.next();
            ObjectName objectName = (ObjectName) entry.getKey();
            MBeanGBeanBridge bridge = (MBeanGBeanBridge) entry.getValue();
            try {
                mbeanServer.registerMBean(bridge, objectName);
View Full Code Here

        //2nd example: copy 10 (all)
        HashMap oldPool = pool;
        pool = new HashMap(maxSize);
        //since we have replaced pool already, pool.remove will be very fast:-)
        assert oldPool.size() == connectionCount;
        Iterator it = oldPool.entrySet().iterator();
        for (int i = 0; i < shrinkNow; i++) {
            ConnectionInfo killInfo = new ConnectionInfo((ManagedConnectionInfo) ((Map.Entry)it.next()).getValue());
            internalReturn(killInfo, ConnectionReturnAction.DESTROY);
        }
        for (; it.hasNext(); ) {
View Full Code Here

        Configurations.removeProperty("properties", remaining);
       
        // now warn if there are any remaining properties that there
        // is an unhandled prop
        Map.Entry entry;
        for (Iterator itr = remaining.entrySet().iterator(); itr.hasNext();) {
            entry = (Map.Entry) itr.next();
            if (entry.getKey() != null)
                warnInvalidProperty((String) entry.getKey());
            ser &= entry.getValue() instanceof Serializable;
        }
View Full Code Here

     
      //Notify outside the lock to prevent deadlock
     
      //Send notifications for the replicant data removed
     
      for (Iterator i = toNotify.entrySet().iterator(); i.hasNext(); )
      {
         Map.Entry entry = (Map.Entry)i.next();
         String key = (String)entry.getKey();

         ClusterNotification notification = new ClusterNotification(ClusterNotification.TYPE_REPLICATOR_REMOVE, nodeToRemove.intValue(), key);
View Full Code Here

        Configurations.removeProperty("Id", remaining, map);

        // now warn if there are any remaining properties that there
        // is an unhandled prop, and remove the unknown properties
        Map.Entry entry;
        for (Iterator itr = remaining.entrySet().iterator(); itr.hasNext();) {
            entry = (Map.Entry) itr.next();
            Object key = entry.getKey();
            if (key != null) {
                warnInvalidProperty((String) key);
                map.remove(key);
View Full Code Here

                subtreesMap.put(tagNo, new HashSet());
            }
            ((Set)subtreesMap.get(tagNo)).add(subtree);
        }

        for (Iterator it = subtreesMap.entrySet().iterator(); it.hasNext();)
        {
            Map.Entry entry = (Map.Entry)it.next();

            // go through all subtree groups
            switch (((Integer)entry.getKey()).intValue())
View Full Code Here

     * THIRD PASS: In this pass, we move any non-conflicting bindings
     * directly into the map. In the case of conflicts, we apply some
     * further logic to try to resolve them. If the conflict can't be
     * resolved, then we log the problem.
     */
    final Iterator possibleBindingItr = possibleBindings.entrySet()
        .iterator();
    while (possibleBindingItr.hasNext()) {
      final Map.Entry entry = (Map.Entry) possibleBindingItr.next();
      final TriggerSequence trigger = (TriggerSequence) entry.getKey();
      final Object match = entry.getValue();
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.