20 package org.matsim.utils.objectattributes.attributeconverters;
24 import org.apache.logging.log4j.LogManager;
33 String[] values = value.split(DELIMITER);
34 double[] result =
new double[values.length];
35 for (
int i = 0; i < values.length; i++) {
36 result[i] = Double.parseDouble(values[i]);
43 if (!(o instanceof
double[])) {
44 LogManager.getLogger(getClass()).error(
"Object is not of type double[] " + o.getClass().toString());
47 double[] s = (
double[]) o;
48 StringBuilder result =
new StringBuilder();
49 for (
int i = 0; i < s.length; i++) {
51 result.append(DELIMITER);
55 return result.toString();
double [] convert(String value)
static final String DELIMITER
String convertToString(Object o)