org.apache.felix.utils.properties.Properties.entrySet()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(116)

本文整理了Java中org.apache.felix.utils.properties.Properties.entrySet()方法的一些代码示例,展示了Properties.entrySet()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Properties.entrySet()方法的具体详情如下:
包路径:org.apache.felix.utils.properties.Properties
类名称:Properties
方法名:entrySet

Properties.entrySet介绍

暂无

代码示例

代码示例来源:origin: apache/karaf

public Properties getProperties() {
  Properties props = new Properties();
  try {
    org.apache.felix.utils.properties.Properties properties
        = new org.apache.felix.utils.properties.Properties();
    properties.load(new StringReader(value));
    for (Map.Entry<String, String> e : properties.entrySet()) {
      props.put(e.getKey(), e.getValue());
    }
  } catch (IOException e) {
    // ignore??
  }
  return props;
}

代码示例来源:origin: apache/karaf

@Override
protected void doOpen() throws Exception {
  super.doOpen();
  Properties configuration = new Properties();
  File configFile = new File(System.getProperty("karaf.etc"), FEATURES_SERVICE_CONFIG_FILE);
  if (configFile.isFile() && configFile.canRead()) {
    try {
      configuration.load(new FileReader(configFile));
    } catch (IOException e) {
      logger.warn("Error reading configuration file " + configFile.toString(), e);
    }
  }
  Dictionary<String, String> props = new Hashtable<>();
  for (Map.Entry<String, String> entry : configuration.entrySet()) {
    props.put(entry.getKey(), entry.getValue());
  }
  updated(props);
}

代码示例来源:origin: jboss-fuse/fabric8

for (Map.Entry<String, String> p : childMap.entrySet()) {
  if (Profile.DELETED.equals(p.getValue())) {
    ctrl.props.remove(p.getKey());

相关文章