- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {ScheduledThreadPoolExecutor s =
new ScheduledThreadPoolExecutor(corePoolSize)
ThreadFactory threadFactory;new ScheduledThreadPoolExecutor(corePoolSize, threadFactory)
String str;new ScheduledThreadPoolExecutor(1, new ThreadFactoryBuilder().setNameFormat(str).build())
- Smart code suggestions by Codota
}
private Map<String, String> loadValues(Parameter<?,?> p) { try { return p.getCargo(ValuesCargo.class).loadStringMap(); } catch (IOException e) { return new HashMap<String, String>(); } }
@Override public void beginMapping() throws IOException { C parameter = getParameter(); this.references = new LinkedHashMap<String, String>(); if(parameter.hasCargo(ReferencesCargo.class)){ ReferencesCargo cargo = parameter.getCargo(ReferencesCargo.class); this.references.putAll(cargo.loadReferences()); } }
static public DecimalFormat getFormat(Parameter<?, ?> parameter){ if(parameter.hasCargo(ValuesCargo.class)){ ValuesCargo valuesCargo = parameter.getCargo(ValuesCargo.class); try { Map<String, BigDecimal> values = parseValues(valuesCargo.loadStringMap()); ScaleFrequencyMap map = ScaleFrequencyMap.sample(values.values()); int minCount = Math.max(3, values.size() / 10); return new DecimalFormat(map.getPattern(minCount), new DecimalFormatSymbols(Locale.US)); } catch(Exception e){ logger.log(Level.WARNING, "Parameter \'" + parameter.getId() + "\' does not specify decimal format", e); } } return null; }