Package java.util

Examples of java.util.Properties.entrySet()


          is = url.openStream();

          Properties props = new Properties();
          props.load(is);

          for (Map.Entry entry : props.entrySet()) {
            String apiName = (String) entry.getKey();
            String serializerName = (String) entry.getValue();

            Class apiClass = null;
            Class serializerClass = null;
View Full Code Here


            p = JMeterUtils.getJMeterProperties();
        }
        if (p == null) {
            return;
        }
        Set<Map.Entry<Object, Object>> s = p.entrySet();
        ArrayList<Map.Entry<Object, Object>> al = new ArrayList<Map.Entry<Object, Object>>(s);
        Collections.sort(al, new Comparator<Map.Entry<Object, Object>>(){
            public int compare(Map.Entry<Object, Object> o1, Map.Entry<Object, Object> o2) {
                String m1,m2;
                m1=(String)o1.getKey();
View Full Code Here

       
        Properties p = new Properties();
        p.put("Name","Value");
        Functor fk = new Functor(Map.Entry.class,"getKey");
        Functor fv = new Functor(Map.Entry.class,"getValue");
        Object o = p.entrySet().iterator().next();
        assertEquals("Name",fk.invoke(o));
        assertEquals("Value",fv.invoke(o));
    }
   
    public void testBadParameters() throws Exception{
View Full Code Here

    try {
      if (headerFile != null) {
        fs = new FileInputStream(headerFile);
        Properties properties = new Properties();
        properties.load(fs);
        for (Map.Entry<Object, Object> propertiesEntry : properties.entrySet()) {
          String key = (String) propertiesEntry.getKey();
          String value = (String) propertiesEntry.getValue();
          logger.debug("Inserting Header Key [" + key + "] header value [" +
          value + "]");
          headers.put(key, value);
View Full Code Here

        // Override with system properties
        Properties serviceProperties = new Properties();
        String prefix = serviceId + ".";
        Properties sysProps = new Properties(System.getProperties());
        sysProps.putAll(SystemInstance.get().getProperties());
        for (Iterator iterator1 = sysProps.entrySet().iterator(); iterator1.hasNext();) {
            Map.Entry entry1 = (Map.Entry) iterator1.next();
            String key = (String) entry1.getKey();
            Object value = entry1.getValue();
            if (value instanceof String && key.startsWith(prefix)) {
                key = key.replaceFirst(prefix, "");
View Full Code Here

    }

    if (indexProperties) {
      Properties props = docData.getProps();
      if (props != null) {
        for (final Map.Entry<Object,Object> entry : props.entrySet()) {
          Field f = ds.getField((String) entry.getKey(), storeVal, indexVal, termVecVal);
          f.setValue((String) entry.getValue());
          doc.add(f);
        }
        docData.setProps(null);
View Full Code Here

        }
    }

    protected void setSessionProperties() {
        Properties props = loadBrandingProperties();
        for (Map.Entry<Object, Object> entry : props.entrySet()) {
            String key = (String) entry.getKey();
            if (key.startsWith("session.")) {
                session.put(key.substring("session.".length()), entry.getValue());
            }
        }
View Full Code Here

        InputStream is = null;
        Properties props = new Properties();
        try {
            is = new FileInputStream(f);
            props.load(is);
            for (Map.Entry<Object, Object> me : props.entrySet()){
                String key = (String) me.getKey();
                String value = (String)me.getValue();
                int typeSep = key.indexOf("$"); // $NON-NLS-1$
                try {
                    if (typeSep > 0){
View Full Code Here

            Properties props = new Properties();
            BufferedInputStream input = new BufferedInputStream(new FileInputStream(fileName));
            props.load(input);
            input.close();
            PropertyMap map = new PropertyMap();
            for (Iterator i = props.entrySet().iterator(); i.hasNext();) {
                Map.Entry entry = (Map.Entry) i.next();
                String key = entry.getKey().toString().trim();
                String value = entry.getValue().toString().trim();
                map.put(key, value);
            }
View Full Code Here

                p.load(inputStream);

                Strings.Resolver resolver = new Strings.ChainedResolver
                    (Strings.SYSTEM_RESOLVER, new Strings.PropertiesResolver(p));

                for (Map.Entry me : p.entrySet())
                {
                    String key = (String) me.getKey();
                    String value = (String) me.getValue();
                    String expanded = Strings.expand(value, resolver);
                    environment.put(key, expanded);
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.