Package java.util

Examples of java.util.Properties.entrySet()


        return clone;
    }
   
    private static Properties cloneProps(Properties p) {
        Properties props = new Properties();
        for (Map.Entry<?,?> pe : props.entrySet()) {
            props.put(pe.getKey(), pe.getValue());
        }
        return props;
    }
}
View Full Code Here


                }
            }
        }

        // create PropertyMetadata for the properties from the file
        for ( Map.Entry<Object, Object> pEntry: props.entrySet() )
        {
            PropertyMetadata prop = new PropertyMetadata();
            prop.setName( String.valueOf( pEntry.getKey() ) );
            prop.setValue( String.valueOf( pEntry.getValue() ) );
            m_currentComponent.addProperty( prop );
View Full Code Here

            IOUtils.closeQuietly(is);
        }

        Map<String, String> map = new HashMap<String, String>();

        for(Map.Entry<Object, Object> entry: properties.entrySet()) {
            String key = entry.getKey() != null ? entry.getKey().toString() : null;
            String value = entry.getValue() != null ? entry.getValue().toString() : null;

            map.put(key, value);
        }
View Full Code Here

    //-------------------------------------------------------------------------

    protected void setupFeatures(DocumentBuilderFactory factory) {
        Properties properties = System.getProperties();
        List<String> features = new ArrayList<String>();
        for (Map.Entry<Object, Object> prop : properties.entrySet()) {
            String key = (String) prop.getKey();
            if (key.startsWith(XmlConverter.DOCUMENT_BUILDER_FACTORY_FEATURE)) {
                String uri = ObjectHelper.after(key, ":");
                Boolean value = Boolean.valueOf((String)prop.getValue());
                try {
View Full Code Here

            throws IOException {
        try {
            Properties tmp = new Properties();
            tmp.load(ins);

            for (Map.Entry<Object, Object> entry : tmp.entrySet()) {
                final String value = (String)entry.getValue();
                props.put((String) entry.getKey(), (value == null ? null : value.trim()));
            }
        } finally {
            try {
View Full Code Here

        this.props = new HashMap<String, String>();
        for(int i = files.length - 1; i >= 0; i--) {
            Properties properties = new Properties();
            InputStream input = new BufferedInputStream(new FileInputStream(files[i].getAbsolutePath()));
            properties.load(input);
            for(Entry<Object, Object> e: properties.entrySet())
                this.props.put((String) e.getKey(), (String) e.getValue());
            input.close();
        }
    }
View Full Code Here

            final String filename = "selenium-temp-config-" + System.currentTimeMillis() + ".json";

            if (jvmArgs != null) {
                Properties p = new Properties();
                p.load(new StringReader(jvmArgs.replace("\\", "\\\\")));
                for (Entry<Object, Object> e : p.entrySet()) {
                    opt.getJVMArguments().put(e.getKey().toString(), e.getValue().toString());
                }
            }

            if (seleniumArgs != null) {
View Full Code Here

   }

   private void initPropertiesFromResource()
   {
      Properties props = loadFromResource("/seam.properties");
      for (Map.Entry me : props.entrySet())
      {
         properties.put((String) me.getKey(), new Conversions.FlatPropertyValue((String) me
                  .getValue()));
      }
   }
View Full Code Here

      if (testFile.exists()) {
        System.out.println();
        System.out.println(">>> " + TEST_PROPERTIES_PROP + " : " + testFile.getAbsolutePath());
        Properties testProperties = new Properties();
        testProperties.load(new FileReader(testFile));
        for (Map.Entry entry : testProperties.entrySet()) {
          if (!System.getProperties().containsKey(entry.getKey())) {
            System.setProperty((String) entry.getKey(), (String) entry.getValue());
          }
        }
      }
View Full Code Here

      throw new SienaException(e);
    }
    // Override with system properties
    String prefix = "siena."+pack+".";
    Properties sysprops = System.getProperties();
    for (Map.Entry<Object, Object> entry : sysprops.entrySet()) {
      String key = entry.getKey().toString();
      if(key.startsWith(prefix)) {
        String value = entry.getValue().toString();
        p.setProperty(key.substring(prefix.length()), value);
      }
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.