Package java.util

Examples of java.util.Map.keySet()


   }

   private String getDataAsText(int pos) {
      Map map = this.dataSet[pos];
      StringBuffer buffer = new StringBuffer("[");
      Object[] keys = map.keySet().toArray();
      for (int i=0; i < keys.length; i++) {
         if (i != 0) buffer.append(";");
         buffer.append(keys[i]).append("=");
         ClientProperty cp = (ClientProperty)map.get(keys[i]);
         String tmp = "null";
View Full Code Here


         log.info("Used settings are:");
         log.info("   -interactive    " + interactive);
         log.info(" ConnectQos settings");
         log.info("   -connect/qos/persistent " + connectPersistent);
         if (connectQosClientPropertyMap != null) {
            Iterator it = connectQosClientPropertyMap.keySet().iterator();
            while (it.hasNext()) {
               String key = (String) it.next();
               log.info("   -connect/qos/clientProperty[" + key + "]   "
                     + connectQosClientPropertyMap.get(key).toString());
            }
View Full Code Here

            ConnectQos qos = new ConnectQos(glob);
            if (connectPersistent) {
               qos.setPersistent(connectPersistent);
            }
            if (connectQosClientPropertyMap != null) {
               Iterator it = connectQosClientPropertyMap.keySet().iterator();
               while (it.hasNext()) {
                  String key = (String) it.next();
                  qos.addClientProperty(key, connectQosClientPropertyMap.get(
                        key).toString());
               }
View Full Code Here


   private String[] getHosts() {
      String prefix = "filewatcher.test.host.";
      Map hosts = InfoHelper.getPropertiesStartingWith(prefix, this, null);
      String[] keys = (String[])hosts.keySet().toArray(new String[hosts.size()]);
      TreeMap newHosts = new TreeMap();
     
      // we want them in a random order
      Random random = new Random();
      for (int i=0; i < keys.length; i++) {
View Full Code Here

    types.add(JMuleCoreStats.ST_DISK_SHARED_FILES_PARTIAL_BYTES);
    for(int i = 0; i <= 10; i++) {
     
       Map stats = core_stats.getStats(types);
      
       for(Object obj : stats.keySet()) {
         System.out.println("---" + obj + stats.get(obj) + "---");
       }
       System.out.println("************************************************");
       try {
         Thread.currentThread().sleep(2000);
View Full Code Here

    private void setProperties(final Condition condition)
    {
        if (condition != null)
        {
            final Map values = condition.getProperties();
            for (final Iterator valueIterator = values.keySet().iterator(); valueIterator.hasNext();)
            {
                final String id = (String)valueIterator.next();
                this.templateContext.put(
                    id,
                    values.get(id));
View Full Code Here

        final XmlObjectFactory registryFactory = XmlObjectFactory.getInstance(NamespaceRegistry.class);
        final ComponentContainer container = ComponentContainer.instance();

        // - discover all registries and sort them by name
        final Map registryMap = this.discoverAllRegistries();
        final List registries = new ArrayList(registryMap.keySet());
        Collections.sort(
            registries,
            new NamespaceRegistryComparator());
        for (final Iterator iterator = registries.iterator(); iterator.hasNext();)
        {
View Full Code Here

                }
            }
        }

        // - second process and write any output from the defined resource locations.
        for (final Iterator iterator = locations.keySet().iterator(); iterator.hasNext();)
        {
            final String location = (String)iterator.next();
            final Collection contents = (Collection)locations.get(location);
            if (contents != null)
            {
View Full Code Here

        {
            final Conditions conditions = (Conditions)iterator.next();
            final Map outputPaths = conditions.getOutputPaths();
            final String conditionsType = conditions.getType();
            int ctr = 0;
            for (final Iterator pathIterator = outputPaths.keySet().iterator(); pathIterator.hasNext(); ctr++)
            {
                final String outputPath = (String)pathIterator.next();

                // - only evaluate if we haven't yet evaluated
                writable = (Boolean)evaluatedPaths.get(path);
View Full Code Here

     */
    private boolean isValidTemplate(final String path)
    {
        boolean exclude = false;
        final Map exclusions = this.getTemplateEngineExclusions();
        for (final Iterator pathIterator = exclusions.keySet().iterator(); pathIterator.hasNext();)
        {
            final String exclusionPath = (String)pathIterator.next();
            if (path.startsWith(exclusionPath))
            {
                final String[] patterns = (String[])exclusions.get(exclusionPath);
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.