code: public static List<DataPoint> parse(String points, String splitRegex, Class<?> type, long ts) {
          String[] items = points.split(splitRegex);
          List<DataPoint> ret = new ArrayList<DataPoint>();
          for (String i : items) {
              if (i.length() == 0) {
                  continue;
              }
  
              if (type == Long.class || type == Integer.class) {
                  ret.add(new DataPoint(ts, Long.parseLong(i)));
              } else if (type == Float.class || type == Double.class) {
                  ret.add(new DataPoint(ts, Double.parseDouble(i)));
              } else if (type == String.class) {
                  ret.add(new DataPoint(ts, i));
              }
          }
          return ret;
      }
docs: Takes a string that is a delimited list of values all of a particular type (integer, long,
  float, double, or string) and parses them into a List of DataPoints all with the same
  timestamp.
  
  @param points     Delimited string containing points to be parsed.
  @param splitRegex Delimiter to split the string on (e.g., a comma (,) for csv).
  @param type       Data type of the points, either Integer/Long, Float/Double, or String.
  @param ts         The timestamp to apply to all the points.
  @return A DataPoint List of all parseable points.