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

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

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

Properties.getRaw介绍

暂无

代码示例

代码示例来源:origin: org.apache.felix/org.apache.felix.utils

public List<String> getRaw(String key) {
  return storage.getRaw(key);
}

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

public List<String> getRaw(String key) {
  return storage.getRaw(key);
}

代码示例来源:origin: org.apache.felix/org.apache.felix.fileinstall

public List<String> getRaw(String key) {
  return storage.getRaw(key);
}

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

public boolean update(Properties properties) {
  boolean modified = false;
  // Remove "removed" properties from the cfg file
  for (String key : new ArrayList<String>(this.keySet())) {
    if (!properties.containsKey(key)) {
      this.remove(key);
      modified = true;
    }
  }
  // Update existing keys
  for (String key : properties.keySet()) {
    String v = this.get(key);
    List<String> comments = properties.getComments(key);
    List<String> value = properties.getRaw(key);
    if (v == null) {
      this.put(key, comments, value);
      modified = true;
    } else if (!v.equals(properties.get(key))) {
      if (comments.isEmpty()) {
        comments = this.getComments(key);
      }
      this.put(key, comments, value);
      modified = true;
    }
  }
  return modified;
}

代码示例来源:origin: org.apache.felix/org.apache.felix.fileinstall

public boolean update(Properties properties) {
  boolean modified = false;
  // Remove "removed" properties from the cfg file
  for (String key : new ArrayList<String>(this.keySet())) {
    if (!properties.containsKey(key)) {
      this.remove(key);
      modified = true;
    }
  }
  // Update existing keys
  for (String key : properties.keySet()) {
    String v = this.get(key);
    List<String> comments = properties.getComments(key);
    List<String> value = properties.getRaw(key);
    if (v == null) {
      this.put(key, comments, value);
      modified = true;
    } else if (!v.equals(properties.get(key))) {
      if (comments.isEmpty()) {
        comments = this.getComments(key);
      }
      this.put(key, comments, value);
      modified = true;
    }
  }
  return modified;
}

代码示例来源:origin: org.apache.felix/org.apache.felix.utils

public boolean update(Properties properties) {
  boolean modified = false;
  // Remove "removed" properties from the cfg file
  for (String key : new ArrayList<String>(this.keySet())) {
    if (!properties.containsKey(key)) {
      this.remove(key);
      modified = true;
    }
  }
  // Update existing keys
  for (String key : properties.keySet()) {
    String v = this.get(key);
    List<String> comments = properties.getComments(key);
    List<String> value = properties.getRaw(key);
    if (v == null) {
      this.put(key, comments, value);
      modified = true;
    } else if (!v.equals(properties.get(key))) {
      if (comments.isEmpty()) {
        comments = this.getComments(key);
      }
      this.put(key, comments, value);
      modified = true;
    }
  }
  return modified;
}

相关文章