Package java.util

Examples of java.util.Properties.entrySet()


//        Map<String, String> englishMap = FastMap.newInstance();
        Set<String> deKeys = FastSet.newInstance();
        Map<String, String> missingInDE = new TreeMap();
        Set<String> unusedInDE = FastSet.newInstance();

        for (Entry<Object, Object> entry : de.entrySet()) {
            deKeys.add(entry.getKey().toString());
        }

        for (Entry<Object, Object> entry : english.entrySet()) {
            if (!deKeys.contains(entry.getKey().toString()))
View Full Code Here


      } else {
        // append new label to existing file
        Properties labelProperties = loadLabel(labelFile);
        if (!labelProperties.containsKey(key)) {
          writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(labelFile.getLocation().toFile(), true), "8859_1"));
          if(labelProperties.entrySet().size()>0){
            writer.newLine();
          }         
          writer.write(LabelFileEncodingHelper.saveConvert(key, true));
          writer.write("=");
          writer.write(LabelFileEncodingHelper.saveConvert(value, false));         
View Full Code Here

        InputStream is = new FileInputStream( prop_file );

        try{
          props.load( is );

          Iterator it = props.entrySet().iterator();

          while( it.hasNext()){

            Map.Entry entry = (Map.Entry)it.next();
View Full Code Here

      properties.load(LogFactory.class.getClassLoader()
          .getResourceAsStream("firefly-log.properties"));
    } catch (IOException e) {
      e.printStackTrace();
    }
    for (Entry<Object, Object> entry : properties.entrySet()) {
      String name = (String) entry.getKey();
      String value = (String) entry.getValue();
      System.out.println(name + "|" + value);

      String[] strs = StringUtils.split(value, ',');
View Full Code Here

    }

    //start namespace prefix mapping
        Properties namespaceURIs = descriptor.getNamespaceURIs();
    if(namespaceURIs != null){
      Iterator iter = namespaceURIs.entrySet().iterator();
      while(iter.hasNext()){
        Map.Entry namespaceURI = (Map.Entry)iter.next();
                String prefix = (String)namespaceURI.getKey();
                String uri = (String)namespaceURI.getValue();
                //start name space mapping if not started
View Full Code Here

    handler.endElement(descriptor.getNamespaceURI(), descriptor.getName(), descriptor.getQName());
   
    //end namespace prefix mapping
        Properties namespaceURIs = descriptor.getNamespaceURIs();
    if(namespaceURIs != null){
            Iterator iter = namespaceURIs.entrySet().iterator();
            while(iter.hasNext()){
                Map.Entry namespaceURI = (Map.Entry)iter.next();
                String prefix = (String)namespaceURI.getKey();
                String uri = (String)namespaceURI.getValue();
                if(parent != null && uri.equals(parent.getNamespaceURI(prefix))) {
View Full Code Here

    }

    private Map<String, String> loadProperties(TestFile file) {
        Properties properties = GUtil.loadProperties(file);
        Map<String, String> result = new HashMap<String, String>();
        for (Map.Entry<Object, Object> entry : properties.entrySet()) {
            result.put(entry.getKey().toString(), entry.getValue().toString());
        }
        return result;
    }
View Full Code Here

  protected void doneParsing() throws SAXException
  {
    super.doneParsing();
    final Properties properties = getResult();
    final ArrayList list = new ArrayList();
    final Iterator entries = properties.entrySet().iterator();
    while (entries.hasNext())
    {
      final Map.Entry o = (Map.Entry) entries.next();
      final String key = (String) o.getKey();
      final String value = (String) o.getValue();
View Full Code Here

      provider.setUrl(urlReadHandler.getResult());
    }
    if (propertiesReadHandler != null)
    {
      final Properties p = (Properties) propertiesReadHandler.getObject();
      final Iterator it = p.entrySet().iterator();
      while (it.hasNext())
      {
        final Map.Entry entry = (Map.Entry) it.next();
        provider.setProperty((String) entry.getKey(), (String) entry.getValue());
      }
View Full Code Here

            trace("translation: "+language);
            byte[] trans = getFile("_text_"+language+".prop");
            trace("  "+new String(trans));
            text = SortedProperties.fromLines(new String(trans, "UTF-8"));
            // remove starting # (if not translated yet)
            for (Entry<Object, Object> entry : text.entrySet()) {
                String value = (String) entry.getValue();
                if (value.startsWith("#")) {
                    entry.setValue(value.substring(1));
                }
            }
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.