@Override public synchronized Object computeIfAbsent(Object key, Function mappingFunction) { if (interned != null) copyFromInternedToThis(); return super.computeIfAbsent(key, mappingFunction); }
@Override public synchronized Object computeIfAbsent(Object key, Function mappingFunction) { if (interned != null) copyFromInternedToThis(); return super.computeIfAbsent(key, mappingFunction); }
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(); }
/** * 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); }); }); }
/** * 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); }); }); }