本文整理了Java中java.util.Properties.computeIfAbsent()
方法的一些代码示例,展示了Properties.computeIfAbsent()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Properties.computeIfAbsent()
方法的具体详情如下:
包路径:java.util.Properties
类名称:Properties
方法名:computeIfAbsent
暂无
代码示例来源:origin: apache/hive
@Override
public synchronized Object computeIfAbsent(Object key, Function mappingFunction) {
if (interned != null) copyFromInternedToThis();
return super.computeIfAbsent(key, mappingFunction);
}
代码示例来源:origin: org.apache.hive/hive-common
@Override
public synchronized Object computeIfAbsent(Object key, Function mappingFunction) {
if (interned != null) copyFromInternedToThis();
return super.computeIfAbsent(key, mappingFunction);
}
代码示例来源:origin: commercetools/commercetools-jvm-sdk
private static String extract(final Properties properties, final String prefix, final String suffix) {
final String mapKey = buildPropKey(prefix, suffix);
return properties.computeIfAbsent(mapKey, key -> throwPropertiesException(prefix, mapKey)).toString();
}
代码示例来源:origin: gradle.plugin.me.seeber.gradle/gradle-project-config
/**
* Configure the Eclipse JDT task
*
* @param eclipseJdt Eclipse JDT task
*/
@Mutate
public void configureEclipseJdtTask(@Each GenerateEclipseJdt eclipseJdt) {
Properties properties = loadProperties("org.eclipse.jdt.core.prefs");
eclipseJdt.getJdt().getFile().withProperties(p -> {
properties.forEach((name, value) -> {
p.computeIfAbsent(name, n -> value);
});
});
}
代码示例来源:origin: me.seeber.gradle/gradle-project-config
/**
* Configure the Eclipse JDT task
*
* @param eclipseJdt Eclipse JDT task
*/
@Mutate
public void configureEclipseJdtTask(@Each GenerateEclipseJdt eclipseJdt) {
Properties properties = loadProperties("org.eclipse.jdt.core.prefs");
eclipseJdt.getJdt().getFile().withProperties(p -> {
properties.forEach((name, value) -> {
p.computeIfAbsent(name, n -> value);
});
});
}
内容来源于网络,如有侵权,请联系作者删除!