static public ScaleFrequencyMap sample(Collection<?> values){ ScaleFrequencyMap result = new ScaleFrequencyMap(); for(Object value : values){ if(value == null){ continue; } result.add(BigDecimalFormat.toBigDecimal(value)); } return result; } }
public void storeDoubleMap(Map<String, Double> map, DecimalFormat format) throws IOException { storeMap(map, new DoubleFormat(format)); }
public Map<String, Double> loadDoubleMap(DecimalFormat format) throws IOException { return loadMap(new DoubleFormat(format)); }
public Map<String, String> loadStringMap() throws IOException { return loadMap(new StringFormat()); }
public void storeBooleanMap(Map<String, Boolean> map) throws IOException { storeMap(map, new BooleanFormat()); }
public Map<String, Boolean> loadBooleanMap() throws IOException { return loadMap(new BooleanFormat()); }
public Map<String, BigDecimal> loadBigDecimalMap() throws IOException { return loadMap(new BigDecimalFormat()); }
public void storeStringMap(Map<String, String> map) throws IOException { storeMap(map, new StringFormat()); }
public void storeBigDecimalMap(Map<String, BigDecimal> map) throws IOException { storeMap(map, new BigDecimalFormat()); }
final public String format(V value){ if(isNA(value)){ return ValueFormat.NA; } return formatValue(value); }
/** * @see java.text.DecimalFormat */ public String getPattern(){ return getPattern(-1); }
final public V parse(String string){ if((ValueFormat.NA).equals(string)){ return parseNA(); } return parseString(string); }
public Map<String, String> loadReferences() throws IOException { return loadStringMap(); }
public int maxScale(){ return maxScale(-1); }
public void storeReferences(Map<String, String> references) throws IOException { storeStringMap(references); }
public int minScale(){ return minScale(-1); }
public void storeDoubleMap(Map<String, Double> map) throws IOException { storeMap(map, new DoubleFormat()); }
public Map<String, Double> loadDoubleMap() throws IOException { return loadMap(new DoubleFormat()); }